php - echo doesn't work correctly -


echo works fine @ other lines when try add tag table, see tags placed out of tag.

    <table> <th style="cursor:pointer;border-radius:5px 0px 0px 0px;">başlık</th> <th style="cursor:pointer;">başlatan</th> <th style="cursor:pointer;border-radius:0px 5px 0px 0px;">tarih</th>  $sonuc = mysql_query("select a.subject, a.poster_name, a.poster_time, a.id_msg, a.id_topic, b.id_first_msg, b.id_member_started smf_messages a, smf_topics b a.id_msg = b.id_first_msg order id_topic desc limit 10");  if(mysql_num_rows($sonuc)!=0) {     while($oku = mysql_fetch_object($sonuc))     {         echo '<tr id="iceriktablo" style="cursor:pointer;margin-top:0;margin-bottom:0;">';         echo '<a href="forum/index.php?topic='. $oku->id_topic .'"><td style="font-size:13px;font-weight:bold;">';         echo $oku->subject;         echo '</td></a>';         echo '<a href="forum/index.php?topic='. $oku->id_topic .'"><td style="font-size:13px;font-weight:bold;"><center><b>';         echo $oku->poster_name;         echo '</b></center></td></a>';         echo '<td style="font-size:13px;font-weight:bold;"><center><b>';         $zaman = $oku->poster_time;         echo gmdate("d-m-y\ h:i:s", $zaman);         echo '</b></center></td></tr></a>';     } }else{     echo "hiçbir kayıt bulunamadı!"; } mysql_close($conn); ?>  </table> 

result inspect element: http://puu.sh/qed4c/7b04611347.png result: enter image description here filename: index.php

your html invalid:

    echo '<a href="forum/index.php?topic='. $oku->id_topic .'"><td style="font-size:13px;font-weight:bold;"><center><b>';     echo $oku->poster_name;     echo '</b></center></td></a>'; 

the a-tag isn't allowed wrap td (and of course more). guess browser corrected automatically.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -