Hello
I have a problem ..
if a variable $text contains some empty space " " , I need to replace all this empty spaces with %20 , and the result must gone on $text2 .
How can I do it ? Anyone can help me ?
Thanks
Moderators: macek, egami, gesf

$value = str_replace(' ','%20',$value);DoppyNL wrote:
- Code: Select all
$value = str_replace(' ','%20',$value);
If you're building an URL and want to prevent problems with special characters when it is clicked you should use the function urlencode, that function will also take other characters into account.
Greetz Daan
!
Return to PHP coding => General
Users browsing this forum: Google Feedfetcher and 1 guest