proper way to adjust WxH

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

Re: proper way to adjust WxH

Post by bowersbros »

[syntax=php]echo "<img src='".$dir."/".$file."' width='200' height='200'><br>";[/syntax]

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:
User avatar
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK

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.

[syntax=php]echo 'I can\'t remember this.';[/syntax]
notice the \ before the ' in can't.
Post Reply