note 6810 deleted from function.eval by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 23:22:45 +0000 |
| Subject: | note 6810 deleted from function.eval by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22315@lists.php.net to get a copy of this message | ||
//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]
}
That was it. what do you think?