Ivan Ivković Posted May 29, 2012 Share Posted May 29, 2012 if(isset($pics)){ while($fetch = $pics -> fetch_array()){ echo '<li><a id=\'' . $fetch['pic_id'] . '\' href=\'/content/pics/'. $fetch['user_id'] . $fetch['src'] . '\'><img title="Locomotives Roundhouse" alt="Steam locomotives of the Chicago & North Western Railway." src=\'/thumb.php?pic=content/pics/'. $fetch['user_id'] . $fetch['src'] . '&w=90&h=60\'/></a></li>'; } } Output in Chrome: <li> <a id='84' href='/content/pics/9/133596199311823.jpg'> <img title="Locomotives Roundhouse" alt="Steam locomotives of the Chicago & North Western Railway." src='/thumb.php?pic=content/pics/9/133596199311823.jpg&w=90&h=60'/> </a> </li> Output in IE: <li> <a href='/content/pics/9/133596199311823.jpg'> <img title="Locomotives Roundhouse" alt="Steam locomotives of the Chicago & North Western Railway." src='/thumb.php?pic=content/pics/9/133596199311823.jpg&w=90&h=60'> </a> </li> ID attribute is missing and the SRC closing part of the tag is missing! I've tried deleting cookies, history everything. Why is this happening? :S I need that ID. Quote Link to comment https://forums.phpfreaks.com/topic/263316-output-problem-in-ie/ Share on other sites More sharing options...
trq Posted May 29, 2012 Share Posted May 29, 2012 id attributes must begin with a letter, not a number. Quote Link to comment https://forums.phpfreaks.com/topic/263316-output-problem-in-ie/#findComment-1349454 Share on other sites More sharing options...
Ivan Ivković Posted May 29, 2012 Author Share Posted May 29, 2012 Really? Never knew that. Let's try... Does not work. But you're right about ID dogh. But still no change. I've changed to echo '<li><a id=\'pic_' . $fetch['pic_id'] . '\' and Chrome shows the ID correctly. IE doesn't show ID at all. Quote Link to comment https://forums.phpfreaks.com/topic/263316-output-problem-in-ie/#findComment-1349458 Share on other sites More sharing options...
cyberRobot Posted May 29, 2012 Share Posted May 29, 2012 This may seem like a silly question, but are you pointing Chrome and Internet Explorer to the same location? Maybe one is looking at the "live" version while the other is pointing to a development server? The reason I ask is that the image tag is also slightly different. Chrome seems to be outputting as XHTML while Internet Explorer outputs as HTML. ...823.jpg&w=90&h=60'/> - Chrome ...823.jpg&w=90&h=60'> - IE Quote Link to comment https://forums.phpfreaks.com/topic/263316-output-problem-in-ie/#findComment-1349484 Share on other sites More sharing options...
trq Posted May 29, 2012 Share Posted May 29, 2012 IE renders xhtml as html. Quote Link to comment https://forums.phpfreaks.com/topic/263316-output-problem-in-ie/#findComment-1349487 Share on other sites More sharing options...
cyberRobot Posted May 29, 2012 Share Posted May 29, 2012 IE renders xhtml as html. It doesn't remove the closing slash though. Quote Link to comment https://forums.phpfreaks.com/topic/263316-output-problem-in-ie/#findComment-1349489 Share on other sites More sharing options...
Ivan Ivković Posted May 29, 2012 Author Share Posted May 29, 2012 It's my terrible and stupid bad. I tested IE not logged in, which included the wrong file. Thanks, peeps. Quote Link to comment https://forums.phpfreaks.com/topic/263316-output-problem-in-ie/#findComment-1349534 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.