php3-list | 199901
Date: 01/30/99
- Next message: Rasmus Lerdorf: "Re: [PHP3] strstr"
- Previous message: Rasmus Lerdorf: "Re: [PHP3] Mail() *quickly*"
- In reply to: ccunning <email protected>: "[PHP3] strstr"
- Next in thread: ccunning <email protected>: "Re: [PHP3] strstr"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Maybe I have to use a regexp, but since the str functions are faster, I'm trying
> to use this. strstr() is supposed to return the rest of the string if an
> occurance is found, or false if it's not found. I did a
>
> if (!strstr("Re:", $string)) {
> $string = "Re: $string";
> }
>
> Which should add Re: before the string if it doesn't already contain Re:. But,
> when I try it, if string is "Re: some text", then it makes $string = "Re: Re:
> some text".
Careful, you have the arguments to strstr() reverse.
-Rasmus
-- 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>
- Next message: Rasmus Lerdorf: "Re: [PHP3] strstr"
- Previous message: Rasmus Lerdorf: "Re: [PHP3] Mail() *quickly*"
- In reply to: ccunning <email protected>: "[PHP3] strstr"
- Next in thread: ccunning <email protected>: "Re: [PHP3] strstr"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

