Problem with containi function
Hi there!
I'm using containi on my function which searches users by name. And it does not work, it passes like even "Alfred" compared to "elli" (TESTED!). This is my code: PHP Code:
|
Re: Problem with containi function
why use containi?
use contain |
Re: Problem with containi function
Cuz i'd want it to be case insensitive. Is there any difference? If so, i can lower both strings and then contain?
|
Re: Problem with containi function
is this a sensitive case ?
|
Re: Problem with containi function
From string.inc:
PHP Code:
|
Re: Problem with containi function
Figured out! :D I forgot that its returning position of the string, or -1 as not found, so it may be zero also. Thanks anyway!
|
Re: Problem with containi function
contain is case sensitive, containi is not.
They both return the position in the string if the substring is found; It returns -1 if the substring is not found. You should use: if ( containi( ) > -1 ) edit: a little late on the reply as I was typing on my phone :-P |
Re: Problem with containi function
Yeah, figured it out already, thanks any way bugsy :)
|
Re: Problem with containi function
Quote:
|
| All times are GMT -4. The time now is 02:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.