I have tried the following:
preg_replace(' ', '', $filename_name);
But that gives me an error saying that there is no regular expression. How do I tell it that I want it to look for whitespace in a filename and remove it? Many thanks, R
[man]str_replace[/man]
should do it.
e.g., str_replace(' ', '', $filename_name);
Perfect - Thanks!!
To explain the error - preg_replace uses regular expressions to do a pattern match rather than a string match (as str_replace does). The search pattern must start with a symbol (usually / or #) and end with the same one (sometimes followed by extra options).