BostonMark Posted May 2, 2006 Share Posted May 2, 2006 Hi,I'm using $baseurl = $_SERVER['SERVER_NAME'] to get the URL on my site. Now I want to have a way to say if anywhere in $baseurl it says "yaddayaddayadda" then ..., else ....substr is not good because I need to know where to begin for the string to be at. I just want to say is "yaddayaddayadda" anywhere in the String $baseurlThanks Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted May 2, 2006 Share Posted May 2, 2006 Take a look at the [a href=\"http://www.php.net/strpos\" target=\"_blank\"]strpos()[/a] function.Ken Quote Link to comment Share on other sites More sharing options...
BostonMark Posted May 2, 2006 Author Share Posted May 2, 2006 Thanks Ken.I actually just found eregi(), but I also like strpos() as an alternative. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.