bucies image selector thingy

D

David Graham

http://usenet.alt-html.org/image-selector-thingy.php

I hope brucie is around, but if not can anyone else help me understand his
php

$size [3]

the variable above is part of a long statement that joins variables and
strings together to form the usual image tag. The bit above is used to
insert the width and height of an image into its image tag. I don't know
what the number 3 is for inside the square brackets?

thanks (I can't remember how he made the php available, if it was
http://usenet.alt-html.org/image-selector-thingy.phps its not there now)

David
 
M

Marc

$size [3]
Thanks for the hint - will try to learn how he has made use of an array - if
the top man wants to chip in, please feel free (perhaps the aussies are in
bed now - 7.00p.m GMT in UK, so I guess its the middle of the night down
under)

It may well be, but it doesn't mean Brucie will be asleep!
 
D

David Graham

brucie said:

i deleted that just yesterday, i thought everyone that wanted it would
have already saved it to their own puter. but its back up again.
I hope brucie is around

a round what? are you calling me fat?

the bit you should be looking at is:

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

then have a look in the php manual to see what getimagesize does:
http://php.net/manual/en/function.getimagesize.php
Thanks, I will enjoy reading up on the getimagesize() function tomorrow,
time for bed now. My first thoughts, without first reading up on this, is
that this function stores various bits of info about the image and the bit
about its width and height is in the 4th element of the array - just a
guess, probably wrong, can't see how two seperate bits of info (width and
height) could be stored in the same cell of the array anyway - thinking out
aloud here, in private, to half the world, oh dear, I'm rambling on - Good
night, or should it be good morning!

Bye
David
 
B

brucie

the bit you should be looking at is:

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

then have a look in the php manual to see what getimagesize does:
http://php.net/manual/en/function.getimagesize.php
Thanks, I will enjoy reading up on the getimagesize() function tomorrow,
time for bed now. My first thoughts, without first reading up on this, is
that this function stores various bits of info about the image and the bit
about its width and height is in the 4th element of the array - just a
guess, probably wrong, can't see how two seperate bits of info (width and
height) could be stored in the same cell of the array anyway

<q>Index 3 is a text string with the correct height="yyy" width="xxx"
string that can be used directly in an IMG tag. </q>
http://php.net/manual/en/function.getimagesize.php
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top