From:             [EMAIL PROTECTED]
Operating system: Linux 2.2.16
PHP version:      4.0.5
PHP Bug Type:     Arrays related
Bug description:  shifting or popping array with leading or trailing empty elements

Let's say I have this string: 
/FAQ/ 
(a URI, actually) 
An explode action (delim is /)with a resulting count of the array reveals 3 elements. 
After an array_shift or array_pop, the count goes to 1. 3-1=1?

$uri = 
strtolower(preg_replace("/[^a-zA-Z0-9\/]/","",$HTTP_SERVER_VARS["REQUEST_URI"]));
$uri = explode("/", $uri); // make it an array
echo count($uri);
$uri = array_shift($uri); // delete first value which is always empty
echo count($uri);



-- 
Edit Bug report at: http://bugs.php.net/?id=11524&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to