When I run the code you've attached, with $i iterating up to 3, I get three 'empty!', even if $resolution1 should be 'not empty!'. It seems like the $i in $_POST["resolutions".$i] is not getting parsed into a value, and php is looking for a key resolutions$i.
Whoops, I'm an idiot. Resolution singular, not plural. Thanks for the help everyone . -----Original Message----- From: Chris W. Parker [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 3:29 PM To: Stephen Goodman; [EMAIL PROTECTED] Subject: RE: [PHP] evaluating dynamic variable Steve Goodman <mailto:[EMAIL PROTECTED]> on Tuesday, September 02, 2003 12:54 PM said: > Can someone > recommend a way to reliably evaluate this variable? 1. (not positive on this point so correct me if I'm wrong) you shouldn't compare with !==. Instead us !=. 2. What does the following do? for ($i=1; $i<=$entries; $i++) { if(empty($_POST["resolutions".$i])) { echo "empty!"; } else { echo "not empty!" } } You might also like to try isset() along with empty(). hth, Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php