Jump to content

Period isn't included?


3raser

Recommended Posts

$size = getimagesize($image.$extension);

 

Why does the above code echo out: 6png instead of 6.png?

 

Because the dot acts as the concatenation-operator (join 2 strings together). If you want an actual dot you need to write it as a string like

$image.'.'.$extension

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.