I have a variable called image_name. example below
$image_name = "hello.png";
I want to cut the string when it see's the dot. Because I want to add a randomised int so the name cant be duplicated. For example at the moment in my code I have
$image_name = substr($image_name, 0, 10) . time() . rand(0, 9999);
and with the test string above it would return something like
hello.png13953322416647
My aim is have the string name equal to hello13953322416647.png - showing the .png after all timestamp and random number
So does anyone know how cut the string when it hits a dot in a string and then add it at the end..?
Thanks guys