Re: get image size function

From: Date: Wed, 09 Apr 2003 18:32:54 +0000
Subject: Re: get image size function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143139@lists.php.net to get a copy of this message
On Wed, 2003-04-09 at 13:13, Tyler Durdin wrote: > When I run this script: > > <?php > $size = getimagesize ("pictures/pictures/bobby.jpg"); > echo "<img src=\"pictures/pictures/bobby.jpg\" {$size[3]}>"; > ?> > > I get Array (the word Array) and a picture of the image. Why am I not > getting the image size? Did I not configure php to use the image functions? > If that's the case how can I correct this problem? If it's not the case what > is going on here? Please help!!! I don't know why you are getting those results, but I have never used the third parameter. try echo"<pre>"; print_r($size); echo"</pre>"; If you just want the height and width : echo "<img src=\" ... \" width=\"".$size[0]."\" height=\"".$size[1]."\">"; -- Burhan Khalid phplist[at]meidomus[dot]com Please add a reply-to: header in your messages that points to the mailing list address so that all mail is properly archived and viewed.

« previous php.general (#143139) next »