* Thus wrote Jeremy ([EMAIL PROTECTED]): > 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?
If I understand this right you want to set a php $var to 'a' then increment that so it becomes 'b', 'c', 'd', etc.. thus.. $var = ord('a'); while ($var <= ord('z') ) { echo chr($var) , '="";', "\n"; $var++; } HTH, Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php