proper way to adjust WxH

Need help with something HTML related, this is the place to ask.
Post Reply
bowersbros
Posts: 534
Joined: Thu May 05, 2011 8:19 pm

Re: proper way to adjust WxH

Post by bowersbros »

echo "<img src='".$dir."/".$file."' width='200' height='200'><br>";
That should do it.
Last edited by bowersbros on Thu Jun 23, 2011 9:25 am, edited 1 time in total.
I don't like to brag, but I wasn't circumcised. I was circumnavigated. ;)

Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: proper way to adjust WxH

Post by jacek »

uhshosting wrote:and a few others playing around with " and '
The reason you got the syntax error is that you tried to use a quote in the string that you also used to mark the start of the string. PHP cannot tell that the quote in the middle is meant to be part of the string so treats it as the end, and you get the error. you need to escape the quotes in the middle, e.g.
echo 'I can\'t remember this.';
notice the \ before the ' in can't.
Image
Post Reply