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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux