Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the best method to output the correct HTML from my PHP loop
    primarykey
    data
    text
    <p>I have a problem, I have a HTML problem, I don't know if i'm using the best method, so here is my problem: Everthing is ok:<a href="http://screencast.com/t/uJmffaxE" rel="nofollow noreferrer">http://screencast.com/t/uJmffaxE</a><br /> If i have more space, here are starting the problems: <a href="http://screencast.com/t/1z1GRhOLK" rel="nofollow noreferrer">http://screencast.com/t/1z1GRhOLK</a><br /> <strong>Here is my code:</strong></p> <pre><code>&lt;div id="wrap-categories" class="clearfix"&gt; &lt;?php if($this-&gt;categories !== false): ?&gt; &lt;ul&gt; &lt;?php foreach($this-&gt;categories as $category):?&gt; &lt;li&gt; &lt;strong&gt;&lt;?=$category['name']?&gt;&lt;/strong&gt;&lt;br /&gt; &lt;?php if($this-&gt;artistsHelper($category['id']) !== false): ?&gt; &lt;?php foreach($this-&gt;artistsHelper($category['id']) as $artist): ?&gt; &lt;p&gt;&lt;?=$artist['name']?&gt;&lt;/p&gt; &lt;?php endforeach; ?&gt; &lt;?php endif; ?&gt; &lt;/li&gt; &lt;?php endforeach; ?&gt; &lt;/ul&gt; &lt;?php endif; ?&gt; </code></pre> <p></p> <p><strong>And here is how the markup looks like, when is generated:</strong></p> <pre><code> &lt;div id="wrap-categories" class="clearfix"&gt; &lt;ul&gt; &lt;li&gt; &lt;strong&gt;Dj's&lt;/strong&gt;&lt;br /&gt; &lt;p&gt;Big fuckin'artists&lt;/p&gt; &lt;p&gt;asddssdadsasda&lt;/p&gt; &lt;p&gt;Gigle bossu&lt;/p&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Make up&lt;/strong&gt;&lt;br /&gt; &lt;p&gt;Cool&lt;/p&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Mamam&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Tata&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Dawaj&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Sexy&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Bitch&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Armin&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Lol&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Gogu&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Penal&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;li&gt; &lt;strong&gt;Asasin&lt;/strong&gt;&lt;br /&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p><strong>The css</strong></p> <pre><code>#wrap-categories ul li{ float:left; margin-right:10px; } </code></pre> <p>Any help please?!</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.
 

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