| 
	
 | 
 Posted by Ewoud Dronkert on 11/10/05 16:14 
Jørn Dahl-Stamnes wrote: 
> I got the following code: 
>  
>       reset ($_POST); 
>       while (list($key,$val) = each($_POST)) 
>       { 
>         echo "$key => $val\n"; 
>       } 
>  
> But this prints out nothing. If I replace the code above with: 
>  
>  
>       print_r ($_POST); 
>  
> I can see the content of the $_POST array. Why? 
 
Can't think of anything but: 
- it's a bug in your php version..., 
- echo is buffered and/or redirected and print_r is not, 
- "list" or "each" are redefined as constants earlier, 
- the contents of $key or $val are preventing output. 
 
If the last point, try using htmlspecialchars(). 
 
--  
E. Dronkert
 
  
Navigation:
[Reply to this message] 
 |