Re: incrementing string value

From: Date: Fri, 25 Jul 2003 17:14:54 +0000
Subject: Re: incrementing string value
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-156907@lists.php.net to get a copy of this message
JavaScript has arrays too. I'm sure you will find it easier to work with them. <script> var a=new Array(); <?php while($a=read_something()) { ?> a[]="<?= $a ?>"; <?php } ?> </script> Jeremy wrote:
writing some client side javascript with some dynamic php, and I need to be able to print a dynamic number of variables to the javascript. I need to print: var a=""; var b=""; ...etc. Is there a way to increment a php $var much like $var++ would work? Jeremy


« previous php.general (#156907) next »