Reply to Re: help pls..how to clear a url query string

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация