You are here: Re: The $_POST array « PHP Programming Language « IT news, forums, messages
Re: The $_POST array

Posted by Jψrn Dahl-Stamnes on 11/10/05 23:53

Ewoud Dronkert wrote:

> 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.

Seems like a bug to me. I tried this:

$text = print_r ($_POST,true);
echo $text;

and it worked OK. So I'm able to get around this possible bug.

--
JΓΈrn Dahl-Stamnes
http://www.dahl-stamnes.net/dahls/

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация