Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to display data in two column with php
    text
    copied!<p>How can I display data in two columns?</p> <pre><code> &lt;?php $query = "SELECT * FROM `release` WHERE artist_id = '$rcode' AND label_id = '$id'"; $result = mysql_query($query); $tr_no = mysql_num_rows($result); while ($info = mysql_fetch_array($result)) { ?&gt; &lt;div&gt; &lt;table style="width: 100%"&gt; &lt;tr&gt; &lt;td &gt;&lt;img src="../artwork/&lt;?php echo $info['label_id']; ?&gt;/&lt;?php echo $info['ID']; ?&gt;.jpg" width="100" height="100" /&gt;&lt;/td&gt; &lt;td valign="top"&gt; &lt;table style="width: 100%"&gt; &lt;tr&gt; &lt;td style="width: 45px; height: 20px;" class="style5"&gt; &amp;nbsp;&lt;/td&gt; &lt;td style="width: 180px"&gt;&lt;?php echo $info['code']; ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="width: 45px; height: 20px;" class="style5"&gt; &amp;nbsp;&lt;/td&gt; &lt;td style="width: 180px"&gt;&lt;?php echo $info['name']; ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="width: 45px; height: 20px;" class="style5"&gt; &amp;nbsp;&lt;/td&gt; &lt;td style="width: 180px"&gt;&lt;?php echo trh($info['date']); ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="width: 45px; height: 20px;" class="style5"&gt; &amp;nbsp;&lt;/td&gt; &lt;td style="width: 180px"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;?php } ?&gt; </code></pre> <p>Normally I am using this for just one column.</p> <p>What is the easiest way of displaying it in two columns with the same fields I have in this code?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload