Forum Moderators: coopster

Message Too Old, No Replies

Array - better way to write it?

Syntax w/ img width

         

henry0

12:27 pm on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I need to set an img width to 135, that section will get only about 15 to 20 small logo all about the same size and little weight so I do not want to set up a resize script

My querey works fine until I try to add ."width=135"
adding that line line causes the img to not display.

Any better way to do it short of using a resize script

thank you

Printf("<td width=135>"."<b>Logo:</b><br> ". "<img src=" . $query_data [ "picture" ]."width=135>" ."</td>\n" ."</tr>\n");

regard

Henry

Distel

1:18 pm on Nov 24, 2003 (gmt 0)

10+ Year Member



I notice there's no blank space between your img source and the width attribute. Especially if you don't put your attribute values between quotes, this can cause problems. ;)

henry0

1:33 pm on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well it does not change anything

thankyou

daisho

2:11 pm on Nov 24, 2003 (gmt 0)

10+ Year Member



Your like seems a little complicated. Why not just do this:

print( "<td width=135><b>Logo:</b><br><img src='${query_data ['picture']}' width=135></td>\n</tr>\n" );

Makes it a little easier to read.

What problem are you getting? Do the images not display at all?

daisho

henry0

2:24 pm on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



daisho,
thank you so much
more readable and does fine

regards

Henry