Welcome Guest, Not a member yet? Register   Sign In
PHP strpos
#3

[eluser]frist44[/eluser]
I guess i have a few strings that I know need to be tested. If any of them are in the URL, i do NOT want the function to run.

So if (strpos(cur_url(), ‘login’) === FALSE) run the function.

I (strpos(cur_url(), ‘login’) === FALSE) or (strpos(cur_url(), ‘join’) === FALSE) run the function.

however, the above will test each. So if I am on 'login', the (strpos(cur_url(), ‘join’) === FALSE) will be matchen and the function will run even thought i'm on 'login'.

So ideally, i would like to have a list/array of strings, and if any of them are present in cur_url(), do NOT run the function.

It seems to obvious in your head sometimes, but much harder to explain clearly in words.

Thanks!


Messages In This Thread
PHP strpos - by El Forum - 01-01-2010, 12:06 PM
PHP strpos - by El Forum - 01-01-2010, 01:15 PM
PHP strpos - by El Forum - 01-01-2010, 01:22 PM
PHP strpos - by El Forum - 01-01-2010, 01:33 PM
PHP strpos - by El Forum - 01-01-2010, 01:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB