3raser Posted June 6, 2010 Share Posted June 6, 2010 $size = getimagesize($image.$extension); Why does the above code echo out: 6png instead of 6.png? Quote Link to comment Share on other sites More sharing options...
ale8oneboy Posted June 6, 2010 Share Posted June 6, 2010 Does $extension = ".png"; ? Quote Link to comment Share on other sites More sharing options...
3raser Posted June 6, 2010 Author Share Posted June 6, 2010 Does $extension = ".png"; ? No. Quote Link to comment Share on other sites More sharing options...
ale8oneboy Posted June 6, 2010 Share Posted June 6, 2010 Try: "$image.$extension" Instead of $image.$extension Wouldn't $image.$extension just join the two variables as a string? Quote Link to comment Share on other sites More sharing options...
3raser Posted June 6, 2010 Author Share Posted June 6, 2010 Thank you, it works. Quote Link to comment Share on other sites More sharing options...
monkeybidz Posted June 6, 2010 Share Posted June 6, 2010 How about: $size = getimagesize($image."."$extension); Quote Link to comment Share on other sites More sharing options...
ignace Posted June 6, 2010 Share Posted June 6, 2010 $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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.