Eggzorcist Posted July 17, 2012 Share Posted July 17, 2012 Hi there, an unusual problem has occured. It's the first time I've had this issue. I'm printing a loop inside a <section><section> html code which is within the echo of the php code. For some reason when the php echoed variables do not stretch the html <section>. The section stays small as if there were nothing in it. if (isset($fListData)){ echo "<section class='fResults'><ul class='friendlist'>"; foreach ($fListData as $row){ $fDisplay = "<li><a href='profile.php?pf=".$row['id']."'>"; $fDisplay .= $row['firstname']. " " .$row['lastname']; $fDisplay .= " (".$row['username'].")</a></li>"; echo $fDisplay; } echo "</ul></section>"; } else { echo "<p>You currently have no friends. Use the search!</p>"; } Quote Link to comment https://forums.phpfreaks.com/topic/265804-php-not-compatible-with-html-div-box/ Share on other sites More sharing options...
gizmola Posted July 17, 2012 Share Posted July 17, 2012 Did you look at your markup? Is there data there? Are you sure that $fListData is an array, and has the data you expect it to have? Quote Link to comment https://forums.phpfreaks.com/topic/265804-php-not-compatible-with-html-div-box/#findComment-1362086 Share on other sites More sharing options...
Nyphrex Posted July 17, 2012 Share Posted July 17, 2012 If you view the source code, is anything being printed out from the loop? Quote Link to comment https://forums.phpfreaks.com/topic/265804-php-not-compatible-with-html-div-box/#findComment-1362087 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.