|
Posted by Exyle on 06/15/05 04:09
the eregi function should be what you're looking for.
eregi($buffer, $email)
if $email contains $buffer than it will return true. You can also use
regular expressions. eregi is case insensitive (eg it will interpret 'A'
and 'a' as the same thing). the ereg function does the same thing only
it's case sensative.
Ron Eggler @ work wrote:
> Hi,
>
> I want to compare two Strings and I don't know how. Following HTML-Output is
> the result of the below code. why?
> The Strings are the same but the if() is false, why? Thank you!
> [HTML]
> Scofieldada@softhome.net
> <br>
> Scofieldada@softhome.net was passed<br>
> not yet!<br>
> [/HTML]
> [PHP]
> echo $buffer."<br>\n";
> echo $email." was passed<br>\n";
> if ($buffer==$email)
> {
> echo "string already exists!<br>\n";
> return true;
> }
> else
> {
> echo "not yet!<br>\n";
> }
> [/PHP]
>
>
Navigation:
[Reply to this message]
|