RE: [PHP] need help w a for loop

From: Date: Mon, 20 Oct 2003 21:26:49 +0000
Subject: RE: [PHP] need help w a for loop
Groups: php.general 
Request: Send a blank email to php-general+get-166851@lists.php.net to get a copy of this message
Redmond Militante <mailto:r-militante@northwestern.edu> on Monday, October 20, 2003 2:15 PM said: > for($j=0; $j < $categories_count; $j++){ > $categories_array = array(); > $tempval="str_categories".$j; > array_push($categories_array,'$_REQUEST['.$tempval.']'); > } > > it looks like it's appending the string > '$_REQUEST['str_categories0']' to the array $categories_array that's because you've got: > array_push($categories_array,'$_REQUEST['.$tempval.']'); and not: > array_push($categories_array,$_REQUEST[$tempval]); Chris. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook-quotefix/

« previous php.general (#166851) next »