note 2212 deleted from eval by jmoore

From: Date: Tue, 15 Aug 2000 00:08:50 +0000
Subject: note 2212 deleted from eval by jmoore
Groups: php.notes 
Request: Send a blank email to php-notes+get-1851@lists.php.net to get a copy of this message
Can I use eval() to solve the following problem? I have a number of variables from a form $item1,$item2,$item3,..etc. In a loop, I want to be able to reference each of these variables without explicit naming. That is, I want to be able to construct their names from the string "item" and the index variable (say $i). Something like eval("$next = $item.$i;") or what?

« previous php.notes (#1851) next »