Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help please resizing image. 1

Status
Not open for further replies.

cs7536

Programmer
Joined
Apr 20, 2003
Messages
130
Location
US
If I am using:

echo &quot;<img src=&quot;.$imagedir.$row[&quot;image&quot;].&quot; >&quot;;

where do I incorporate width=&quot;150&quot; height=&quot;250&quot; to size the image to desire width and hight?

example:

echo '<img src=images/$image width=&quot;150&quot; height=&quot;250&quot;>';

displays image with width and hight of 150x250

but with: echo &quot;<img src=&quot;.$imagedir.$row[&quot;image&quot;].&quot; >&quot;; how do I accomplishe th same?.




Nothing is hard when you realy want to learn it.

Max
 
I created a Variable $sizeimage= 'width=&quot;100&quot; hight=&quot;100&quot;';
then I inserted the veriable as a congnation in the <img src:> acript amd it displays the size but now my image is gone it displays the little broken image link with the x in it. any ideas, I know that it is desplaying the broken link because the ' on the $sizeimage variable is basicly not evalueating the value of the variable but when I remove the ' it parse errors.


any ideas?

Nothing is hard when you realy want to learn it.

Max
 
does anybody have any idea what I can do to apply this?

Nothing is hard when you realy want to learn it.

Max
 
echo &quot;<img src=&quot;.$imagedir.$row[&quot;image&quot;].&quot; width='250' height='150'>&quot;?

if this answer seems stupid then can u please explain the question in another way?

Known is handfull, Unknown is worldfull
 
Works great I see what I was doig wrong, I tried doing this before but it did not work cause I used width=&quot;100&quot; hight=&quot;100&quot;; I used &quot; instead of ' on the numbers..

Thanks a million


Nothing is hard when you realy want to learn it.

Max
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top