faqts : Computers : Programming : Languages : JavaScript

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

19 of 31 people (61%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Can I put PHP varible values into javascript varibles?

Apr 7th, 2008 22:58
ha mo, Jean-Bernard Valentaten, Daniel Layton,


Yes you can:
<script language="JavaScript">
    var myVar = <?echo(myPHPVar)?>
</script>
HTH,
Jean
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com