I am not storing file names for images in my database. What I am doing to display an image is just "echo" ID of the record and then add ".jpg" at the end. It works fine, but now I need to do something different. I need to resize the image to create thumbnail. I wrote function that does just that, however I can't make it to work because when I try to maipulate the file, it can't find it. It's obvious because it looks for an "ID.jpg" in my database and I only have "ID."
Now my question is how can I add an extension to to a string for this type of manipulation. In other words I need to do something like this:
$image_name = "$ID + .jpg" //to create for example 12345.jpg
. . . Resize $image_name
. . . Save resized image with name 12345.jpg into /thmbnails directory.
I hope that it makes sence.
Now my question is how can I add an extension to to a string for this type of manipulation. In other words I need to do something like this:
$image_name = "$ID + .jpg" //to create for example 12345.jpg
. . . Resize $image_name
. . . Save resized image with name 12345.jpg into /thmbnails directory.
I hope that it makes sence.