note 104557 added to function.urlencode
| From: | konsti dot st at gmx dot ch | Date: | Wed, 22 Jun 2011 23:13:20 +0000 |
| Subject: | note 104557 added to function.urlencode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-180856@lists.php.net to get a copy of this message | ||
A simple way to replace only spaces:
function addSpaces($string) {
$length=strlen($string);
for($z=0;$z<$length;$z++) {
if($string[$z]==" ") $string2.="%20";
else $string2.=$string[$z];
}
return $string2;
}
----
Server IP: 69.147.83.197
Probable Submitter: 77.58.226.115
----
Manual Page -- http://www.php.net/manual/en/function.urlencode.php
Edit -- https://master.php.net/note/edit/104557
Del: integrated -- https://master.php.net/note/delete/104557/integrated
Del: useless -- https://master.php.net/note/delete/104557/useless
Del: bad code -- https://master.php.net/note/delete/104557/bad+code
Del: spam -- https://master.php.net/note/delete/104557/spam
Del: non-english -- https://master.php.net/note/delete/104557/non-english
Del: in docs -- https://master.php.net/note/delete/104557/in+docs
Del: other reasons-- https://master.php.net/note/delete/104557
Reject -- https://master.php.net/note/reject/104557
Search -- https://master.php.net/manage/user-notes.php