| Posted by iktorn on 04/24/07 16:13 
Rami Elomaa napisał(a):> "shotokan99" <soft_devjava@yahoo.com> wrote in message
 > news:1177405709.175883.200600@t39g2000prd.googlegroups.com...
 >> hi guys,
 >>
 >> my url is in this form:  http://www.mysite.com?user=zen
 >>
 >> what to do to remove the query string (..?user=zen) and make my url to
 >> this form: http://www.mysite.com
 >
 >
 > $url = 'http://www.mysite.com?user=zen';
 > list($shorturl) = explode('?', $url);
 > echo $shorturl;
 >
 
 there is a shorter way:
 echo strtok($url,'?');
 
 ;)
 
 --
 Wiktor Walc
 http://phpfreelancer.net
  Navigation: [Reply to this message] |