Note that there are some explanatory texts on larger screens.

plurals
  1. PODisplaying members using php three rows three column
    primarykey
    data
    text
    <p>I created three columns and three rows using <code>li</code>; I want to display one member in every <code>li</code> order by id.</p> <pre><code>&lt;li&gt; // Style: margin-bottom:10px; Show first member result here... &lt;/li&gt; &lt;li class="middle_li"&gt; // Style: margin:0px 10px 10px; Show second member result here... &lt;/li&gt; &lt;li&gt; // Style: margin-bottom:10px; Show third member result here... &lt;/li&gt; &lt;li&gt; // Style: margin-bottom:10px; Show first member result here... &lt;/li&gt; &lt;li class="middle_li"&gt; // Style: margin:0px 10px 10px; Show second member result here... &lt;/li&gt; &lt;li&gt; // Style: margin-bottom:10px; Show third member result here... &lt;/li&gt; &lt;li&gt; // Style: margin-bottom:10px; Show first member result here... &lt;/li&gt; &lt;li class="middle_li"&gt; // Style: margin:0px 10px 10px; Show second member result here... &lt;/li&gt; &lt;li&gt; // Style: margin-bottom:10px; Show third member result here... &lt;/li&gt; </code></pre> <p>My PHP code:</p> <pre><code>&lt;?php require 'initialize.inc.php'; // Classes: connection &amp; members echo '&lt;ul&gt;'; $members = $member-&gt;display_members(); foreach ($members as $member) { $html_ouput = '&lt;li&gt;'; $html_ouput .= 'Show member result here...'; $html_ouput .= '&lt;/li&gt;'; echo $html_output; } echo '&lt;/ul&gt;'; ?&gt; </code></pre> <p>This php code display nine results. Three columns three rows but how can I give every second <code>li</code> row a class middle? Any modification in my php code? I don't want to use javascript.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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