RE: [PHP] Problem with header in an if
| From: | Jay Blanchard | Date: | Fri, 25 Mar 2005 13:14:31 +0000 |
| Subject: | RE: [PHP] Problem with header in an if | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-211559@lists.php.net to get a copy of this message | ||
[snip]
> /* send the errors to the interface and exit*/
> if('' !== $errorsReported){
> for($i = 0; $i < count($errorsReported); $i++){
> echo $errorsReported[$i];
> }
unset($errorsReported);
print_r($errorsReported);
> } else {
> /* reload the empty interface */
a quick echo statement here to check that this block is running when
you expect it to might tell you something... but you have probably
already plastered your code with echo/print statements to determine the
flow :-)
[/snip]
Well, the array still appears, it is empty and unset (see modified code
above) does not get rid of it. Here is how it comes back ....
Array ( [0] => [1] => [2] => [3] => )