[suspicious - maybe spam] [PHP] [suspicious - maybe spam] detecting a leading hyphen from post data

2005-03-20 Thread Larry Brown
I know this is pretty petty, but it is a sunday and I'm missing this for
some reason...

I'm trying to detect a leading hyphen in an element of an array.  I've
been using strpos to find strings and if getting 1 as the result, I know
it was at the beginning of the string.  However, -, \-, nor /^-/
give me a hit?  Could someone throw me a bone here?

Larry

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] detecting a leading hyphen from post data

2005-03-20 Thread Burhan Khalid
Larry Brown wrote:
I know this is pretty petty, but it is a sunday and I'm missing this for
some reason...
I'm trying to detect a leading hyphen in an element of an array.  I've
been using strpos to find strings and if getting 1 as the result, I know
it was at the beginning of the string.  However, -, \-, nor /^-/
give me a hit?  Could someone throw me a bone here?
if ($string{0} === -)
{
  echo Woof;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php