note 6809 deleted from eval by jmoore
| From: | jmoore@php.net | Date: | Tue, 15 Aug 2000 00:12:07 +0000 |
| Subject: | note 6809 deleted from eval by jmoore | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-1861@lists.php.net to get a copy of this message | ||
ANSWER TO: Rob.Buttrose@flinders.edu.au --- Last time I submit this it was cut off, so here goes....
<PRE>
//let's say you have 5 variables
$num_of_vars=5;
for ($i=0; $i < $num_of_vars; $i++)
{
//suppose item1, item2 ... are the variables
eval("$item_array[]=$item".($i+1).";");
//item_array has their values
echo $item_array[$i]
}
<PRE>That was it. what do you think?