note 112666 deleted from function.http-build-url by sobak
| From: | sobak@php.net | Date: | Sun, 04 Dec 2016 07:19:34 +0000 |
| Subject: | note 112666 deleted from function.http-build-url by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208038@lists.php.net to get a copy of this message | ||
Note Submitter: Yzmir Ramirez
----
So you used parse_url(...) and looking to put it back together and seeing if this function will do?
You may have seen some glue* functions that will rebuild the url with the parts that you have. Try
this:
<?php
$parts = parse_url($uri);
/* do your magic here on $parts */
$uri = http_build_url('', $parts);
?>
Notice the first param is empty string. It also works with NULL and array() as well.