Re: Odd is_int() behaviour

From: Date: Mon, 22 Oct 2001 23:33:31 +0000
Subject: Re: Odd is_int() behaviour
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-71881@lists.php.net to get a copy of this message
Yasuo Ohgaki wrote:
This is expected behaviour. Ashley M. Kirchner wrote:
    I have the following snippet in my file:
      if ($PATH_INFO == "") { $PATH_INFO = "/"; }
      echo "PATH_INFO: $PATH_INFO<br>\n";
      // All we want is the fist element, call it $section
      list($section) = explode('/', substr($PATH_INFO,1));
explode() is string function and returns array of strings. Therefore, type is integer.
Oops. Obviously this line is wrong. It should be "There for type is STRING" not integer... -- Yasuo Ohgaki

« previous php.general (#71881) next »