I've this piece of code to rename a file by adding the uploading date, but then I want also to remove all spaces
rename("./uploads/" . "$directory/" . $mvcfile->FileName , "./uploads/" . "$directory/" . $data . "_" . $mvcfile->FileName);
I've tried with
str_replace (" ", "", $mvcfile->FileName);
but it doesn't work.
Any idea of why? I'm pretty new to PHP: what's "->"? Could be this the hitch? Thanks