faqts : Computers : Programming : Languages : PHP : Not Quite PHP : Javascript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

39 of 72 people (54%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How do I pass variable and other information from PHP to Javascript?

May 8th, 2004 11:57
John Marc, Alan Sunners,


<?
$phpvar='a value';
echo "
<script type=\"text/javascript\">
<!--
jsvar='$phpvar'  
//-->
</script>
";
?>