kejo Posted February 24, 2008 Share Posted February 24, 2008 hello i would like to split: www.site.com/page.php?q=SPLITHERE&cat=0&others=1 into www.site.com/page.php?q= and &cat=0&others=1 how can i do that? i tried with explode, but it didnt work. please help Quote Link to comment Share on other sites More sharing options...
Barand Posted February 24, 2008 Share Posted February 24, 2008 try <?php $url = "www.site.com/page.php?q=&cat=0&others=1"; $p = strpos($url, '='); $part1 = substr($url, 0, $p+1); $part2 = substr($url, $p+1); echo "$part1<br/>$part2"; ?> Quote Link to comment Share on other sites More sharing options...
kejo Posted February 24, 2008 Author Share Posted February 24, 2008 thanks my friend! it works fine 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.