evaluating dynamic variable

From: Date: Tue, 02 Sep 2003 19:54:24 +0000
Subject: evaluating dynamic variable
Groups: php.general 
Request: Send a blank email to php-general+get-161473@lists.php.net to get a copy of this message
Hi, I'm having trouble evaluating a dynamic variable. I want to check if the variable $_POST["resolutions$i"] is an empty string, as you'll see from the code. However, every way I've tried to check the variable so far (including empty() and eval()) always returns a null value, even when the variable should contain a value. I've probably been doing something wrong in my previous efforts. Can someone recommend a way to reliably evaluate this variable? for ($i=1; $i<=$entries; $i++) { if($_POST["resolutions$i"] !== ''){ do_something(); } } Thanks.

« previous php.general (#161473) next »