note 6810 modified in eval by jmoore

From: Date: Tue, 15 Aug 2000 00:12:39 +0000
Subject: note 6810 modified in eval by jmoore
Groups: php.notes 
Request: Send a blank email to php-notes+get-1862@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? http://www.php.net/manual/function.eval.php

« previous php.notes (#1862) next »