Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199901

Re: [PHP3] strstr From: Richard Lynch (lynch <email protected>)
Date: 01/30/99

At 8:21 PM 1/30/99, Rasmus Lerdorf wrote:
>> But remember that PHP uses 0-based arrays. You need to check the return
>> *type* of strstr to distinguish between 0 and false. false is shorthand
>> for '', a string. (I think.) I *know* that:
>
>You are thinking too much again Richard.

Ack! That's strpos that does the position, not strstr. I'm a schnook.

Sorry.

>Sometimes you just have to laugh :) I guess it's pretty hard to find a haystack
>in a needle...

"It is easier to pass a haystack through a needle than to remember what the
hell all these str-functions actually return."

Sorry, couldn't resist.

Guess I'm still ingrained by 10 years of Lisp hacking to just expect the
needle to come first. But I'm typing the right order in my code now, so at
least my fingers now know which is which. :-)

-- "TANSTAAFL" Rich lynch <email protected> webmaster@ and www. all of:
R&B/jazz/blues/rock - jademaze.com music industry org - chatmusic.com
acoustic/funk/world-beat - astrakelly.com sculptures - olivierledoux.com
my own nascent company - l-i-e.com cool coffeehouse - uncommonground.com

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>