Is there a php function that converts the
spaces in a string to the %20 to be placed in a url?
I think its %20 that represents a space
Thanksfound it right after i posted finally..
urlencode/urldecodeYou really should avoid spaces in filenames. It can cause problems in some browsers, especially in saved pages, and problems in search engines.
You are better off using hyphens, or dots, between words.try...
<?php
$old = "Hi there";
$new = str_replace(" ","%20");
echo $new; // Prints Hi%20there
?>
If you need help then here is the URL of the function reference...
<!-- m --><a class="postlink" href="http://uk.php.net/manual/en/function.str-replace.phpthat">http://uk.php.net/manual/en/function.st ... ce.phpthat</a><!-- m --> is what urlencode does DA. it adds them automatically. but you shouldn't have them in there anyway.Oh right, sorry about that didn't see that post
Your signature url says <!-- m --><a class="postlink" href="http://vww">http://vww</a><!-- m -->. I think this might be wrong Originally posted by DA Master
Oh right, sorry about that didn't see that post
Your signature url says <!-- m --><a class="postlink" href="http://vww">http://vww</a><!-- m -->. I think this might be wrong
which one? they all work fine for me.
spaces in a string to the %20 to be placed in a url?
I think its %20 that represents a space
Thanksfound it right after i posted finally..
urlencode/urldecodeYou really should avoid spaces in filenames. It can cause problems in some browsers, especially in saved pages, and problems in search engines.
You are better off using hyphens, or dots, between words.try...
<?php
$old = "Hi there";
$new = str_replace(" ","%20");
echo $new; // Prints Hi%20there
?>
If you need help then here is the URL of the function reference...
<!-- m --><a class="postlink" href="http://uk.php.net/manual/en/function.str-replace.phpthat">http://uk.php.net/manual/en/function.st ... ce.phpthat</a><!-- m --> is what urlencode does DA. it adds them automatically. but you shouldn't have them in there anyway.Oh right, sorry about that didn't see that post
Your signature url says <!-- m --><a class="postlink" href="http://vww">http://vww</a><!-- m -->. I think this might be wrong Originally posted by DA Master
Oh right, sorry about that didn't see that post
Your signature url says <!-- m --><a class="postlink" href="http://vww">http://vww</a><!-- m -->. I think this might be wrong
which one? they all work fine for me.