PHP How-ToPost your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I tried:
<script language="javascript">
<!--//
alert('<?php echo $myarray[1]?>');
//-->
and that did show an alert window with the element in my array at space one. but how would I go about putting that element into a javascript array? I tried doing something like:
a[0] = <?php echo $array[0]?>; but that doesn't work.