Re: How to construct variable names ?!

From: Date: Sun, 26 Nov 2000 09:54:49 +0000
Subject: Re: How to construct variable names ?!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27247@lists.php.net to get a copy of this message
> >I have a string array like > >$fuse > >and get its values by > >$fuse[0], $fuse[1], ... and so on > > > >how do i generate corresponding > >variables like > >$fuse1, $fuse2, ...and so on > > I use > eval("\$fuse$i=$something;"); > where $i is the counter. > cool, thanks. i didn't consider eval. The backslash is for preventing the parser from translating "$fuse$i" and $something into nonsense, i assume. jyrgen

« previous php.general (#27247) next »