note 51016 added to function.preg-replace
| From: | naaina at gmail dot com | Date: | Wed, 16 Mar 2005 19:25:32 +0000 |
| Subject: | note 51016 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-86565@lists.php.net to get a copy of this message | ||
If you want to remove a parameter from an URL, use this function:
<?php
function url_remove_parameter($pURL, $pParameter){
return preg_replace("/(&|\?)" . $pParameter . "=(.+?)(&|$)/",
"\\1", $pURL);
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51016
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51016&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51016&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51016&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51016&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51016&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51016&report=yes
Search -- http://master.php.net/manage/user-notes.php