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 Link to comment https://forums.phpfreaks.com/topic/8895-help-with-_serverserver_name/ 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 Link to comment https://forums.phpfreaks.com/topic/8895-help-with-_serverserver_name/#findComment-32636 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. Link to comment https://forums.phpfreaks.com/topic/8895-help-with-_serverserver_name/#findComment-32640 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.