RE: [PHP] Bug in PHP?

From: Date: Wed, 17 Jul 2002 05:01:35 +0000
Subject: RE: [PHP] Bug in PHP?
Groups: php.general 
Request: Send a blank email to php-general+get-108031@lists.php.net to get a copy of this message
check that the gaps between the domains are really spaces eg: echo ord($HTTP_POST_VARS["domains"]{11}); I did this through a test script: <? $HTTP_POST_VARS["domains"] = "www.php.net www.jokaroo.com www.gnu.org"; $site = explode(" ",$HTTP_POST_VARS["domains"]); print_r($site); exit; ?> and got this as the output Array ( [0] => www.php.net [1] => www.jokaroo.com [2] => www.gnu.org ) But the email program (yours or mine) might be converting the gap to spaces... (??) -----Original Message----- From: Aleks D. [mailto:Dugonjic@sympatico.ca] Sent: Wednesday, July 17, 2002 5:35 PM To: php-general@lists.php.net Subject: [PHP] Bug in PHP? Hello, I'm trying to explode an associative array element in $HTTP_POST_VARS retrieved from submitting am html form. The URL to the form is: http://www.funfry.com/form.html Now when I try to explode $HTTP_POST_VARS["domains"] it doesn't seem to have the desired effect. I use the syntax "$site = explode(" ",$HTTP_POST_VARS["domains"]);" and instead of the expected result of: $site[0] = "www.php.net"; $site[1] = "www.jokaroo.com"; $site[2] = "www.gnu.org"; I get: $site[0] = "www.php.net www.jokaroo.com www.gnu.org"; The value of $HTTP_POST_VARS["domains"] after submitting the form is "www.php.net www.jokaroo.com www.gnu.org". Does anyone have an idea of how I can get each domain in a seperate array index? regards, Aleks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#108031) next »