note 96474 deleted from function.urlencode by danbrown

From: Date: Mon, 01 Mar 2010 15:59:16 +0000
Subject: note 96474 deleted from function.urlencode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-166489@lists.php.net to get a copy of this message
Note Submitter: Filipjohansson.se ---- Reply to: liorbenkereth at gmail dot com Thank you very much for your code, helped a lot. But you have managed to put the strings in str_replace in the wrong order. The correct code should be: <?php function encode_full_url(&$url) { $url = urlencode($url); $url = str_replace("/", "%2F", $url); $url = str_replace(":", "%3A", $url); return $url; } ?> Thanks again!

« previous php.notes (#166489) next »