Possible Duplicate:
how to replace a string contains space with –
I want to replace blank space between words with something.
Example, I have:
$title = "An example title";
$separator = "*";
And I want a function which shows:
An*example*title
Thanks in advance!
Use PHPs str_replace (str_replace — Replace all occurrences of the search string with the replacement string):
So, with your example: