Ok, I want to print an 'img' from php to html. The php file is included inside a html div. It works when I printf the image without the height and width attributes, but when I include them it stops working.
Following code works. No height or width.
$value='../images/cal.png';
printf (
'<img src=%s >',
$value
);
unset($value);
Following code does not work. height and width included.
$value='../images/cal.png';
printf (
'<img src=%s height=100% width=100%>',
$value
);
unset($value);
I'v tried quoting the width and height, but still nothing. What am I missing?
It works with height and width when I use echo, but I am going to be making the code more complicated, so I want to do it in printf. Its been simplified for the question.
Thanks guys!