note 38462 deleted from function.parse-url by didou
| From: | didou@php.net | Date: | Sat, 03 Feb 2007 03:10:03 +0000 |
| Subject: | note 38462 deleted from function.parse-url by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-122621@lists.php.net to get a copy of this message | ||
Note Submitter: alan at zeroasterisk dot com
----
<?
/*
Alan -- here is a useful function for displaying links... if you don't do this, an improper
query string could mess up html code... (by having a > or " or something...)
If you have simple improvements or flaws, please email me. [at]zeroasterisk[d0t]com
*/
function linkprep($link)
{
$link_array=parse_url($link);
$return= str_replace($link_array['query'],
rawurlencode($link_array['query']), $link);
$return= str_replace($link_array['fragment'],
rawurlencode($link_array['fragment']), $return);
return $return;
}
?>