Re: PHP Array to Javascript?
| From: | Ramil Sagum | Date: | Thu, 26 Aug 2004 00:21:25 +0000 |
| Subject: | Re: PHP Array to Javascript? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35886@lists.php.net to get a copy of this message | ||
On Wed, 25 Aug 2004 20:18:23 -0400, Chris Payne
<chris_payne@planetoxygene.com> wrote:
> Hi there everyone,
>
> I set an array using the following in PHP:
>
> $ringb[$i]="$complex_area";
>
> $i++;
>
> It cycles through my DB and stores the info, my question is, how can I
> convert it to a value that can be read in Javascript?
>
> I'm stumped.
>
>
> Chris
>
Output javascript code in HTML that would assign values to variables.
Asimple example would be
<script>
var x;
x = <?php echo $valueofX; ?>;
</script>
HTH
----
ramil
http://ramil.sagum.net