altering a string with PHP

bahija

New Member
If I have filename.jpg, with PHP how would change it too filename123456789.jpg, where 123456789 is a timestamp, I currently do this, \[code\]$name = $filename;$parts = explode(".", $name);$filename = $parts[0].time().'.'.$parts[1];\[/code\]however this just just leaves me with 123456789.
 
Back
Top