On Dec 9, 2005, at 8:30 PM, Johny John wrote:
Hi,
How to pass an array (from php ) to java script and display it
using javascript?...

Jasus.

Well,

FWIK, Here is how you pass a variable:

<script type="text/javascript" language="javascript">
        <?php echo "var picUrl = '$picUrl';\n"; ?>
        document.write(picUrl);
</script>

So, if you know how to instantiate an array in JS, just do a PHP loop where you pull contents out of the PHP array an put into the JS array... then you can do whatever you want with the array later in your JS script... AFAIK.

Hth,
Cheers,
Micky

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to