Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
ZTE MF283U 4G Unlocked Router (Used)
ayanthamaxi
Updated:
Sunday at 8:26 PM
ලංකාවේ හොඳම උපකාරක පන්ති සහ ගුරුවරුන් එකම තැනකින් - TopTuition.lk
dulithapathum
Updated:
Saturday at 8:07 AM
Colombo
RidhMathraa ’26 🎶✨
Tmadhusanka
Updated:
Jul 15, 2026
Ad icon
Colombo
PXN V10 Pro Direct Drive Racing Wheel (Under Warranty)
Abdur Rahman
Updated:
Jul 15, 2026
Ad icon
USDT ණය සේවාව - USDT Loan Service
පුරවැසියා
Updated:
Jul 15, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
Ok lets start learning PHP
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="lionsIT" data-source="post: 1748649" data-attributes="member: 89624"><p>Lets see how to get the size of a image (width and height)</p><p></p><p>[php]<?php</p><p>$filename = "1.jpg";</p><p>$size = getimagesize($filename); //return an array of details</p><p></p><p>echo $size[0].'<br>';//width</p><p>echo $size[1].'<br>';//height</p><p>echo $size[2].'<br>';//image type constant</p><p>echo $size[3].'<br>';// both width and height</p><p>echo $size['mime'].'<br>';// mime type - image/jpeg</p><p></p><p>?>[/php]</p><p></p><p>Remeber to give the correct file path, my image file is on the same directory as my php file.</p></blockquote><p></p>
[QUOTE="lionsIT, post: 1748649, member: 89624"] Lets see how to get the size of a image (width and height) [php]<?php $filename = "1.jpg"; $size = getimagesize($filename); //return an array of details echo $size[0].'<br>';//width echo $size[1].'<br>';//height echo $size[2].'<br>';//image type constant echo $size[3].'<br>';// both width and height echo $size['mime'].'<br>';// mime type - image/jpeg ?>[/php] Remeber to give the correct file path, my image file is on the same directory as my php file. [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom