Re: syntax

From: Date: Wed, 27 Mar 2002 19:18:01 +0000
Subject: Re: syntax
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90408@lists.php.net to get a copy of this message
On Wed, 27 Mar 2002, John Fishworld wrote: use this: ${"ned_".$i."_city"} = $ned_city; after that you can use your new var as $ned_1_city, if $i was 1 ofcourse... But in this case you might be better off using arrays, as some have suggested. > Can someone please remind me what the correct syntax for this is ! > in a loop > and want individual > > $ned_1_city = blah > $ned_2_city = blur > > I've been trying this but its wrong > > $ned_.$i._city = $ned_city ; > > thanks > john > > > > > -- Jan Rademaker <janr@486.yi.org> http://www.ottobak.com

« previous php.general (#90408) next »