Warptweet Posted February 11, 2007 Share Posted February 11, 2007 COMPLETE EDIT: Okay, I know the function... <?php $imagesize = getimagesize(http://www.warptweet.com/warptweetslogo.png) ?> BUT, not how can I do this..? IF $imagesize OVER 75x75 do this action IF $imagesize UNDER 75x75 do this action Quote Link to comment Share on other sites More sharing options...
trq Posted February 11, 2007 Share Posted February 11, 2007 Take a look at getimagesize(). Quote Link to comment Share on other sites More sharing options...
Warptweet Posted February 11, 2007 Author Share Posted February 11, 2007 Yes, I looked at that. But now I have another problem. how can I make it so that IF getimagesize(blahblahblah) is over 75x75 or under 75x75? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 If you actually try to write some code we can help. But all you did was change your question to use the word thorpe posted. Quote Link to comment Share on other sites More sharing options...
Warptweet Posted February 11, 2007 Author Share Posted February 11, 2007 Well, i don't really have much of a code since I don't really understand the function.. <?php $imagesize = getimagesize(http://www.warptweet.com/warptweetslogo.png); if $imagesize < 75{ do this action } else do this action So I basically need help with two things... the line "if $imagesize <75" probably does not mean 75x75 in size, so I need a way to make the computer understand if $imagesize is over 75x75. And if $imagesize is over 75x75, then do an action. Else, then do a different action. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 Did you read the manual? getimagesize returns an array of information. You'll need to compare the width and the height. Quote Link to comment Share on other sites More sharing options...
Warptweet Posted February 11, 2007 Author Share Posted February 11, 2007 I read the manual. I'll see what your trying to say, thanks. Quote Link to comment Share on other sites More sharing options...
Warptweet Posted February 11, 2007 Author Share Posted February 11, 2007 Yay! It works! Now can you please just help me with one more quick thing? <?php list($width, $height) = getimagesize("http://www.warptweet.com/warptweetslogo.png"); if ($width > 100){ if ($height > 100){ do this action } } else do this action ?> My question: Is that how I would do it? Or is the > and < thingy wrongly coded? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 if($width > 75 || $height > 75){ is if either or. if($width > 75 && $height > 75){ is if both. 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.