title: How to loop value into day column based on date get from database into table body?
body: <p>The price date is get from</p>
  
  <pre><code> GROUP_CONCAT(CONCAT(price, ' / ', date)) AS price_date
  </code></pre>
  
  <p>--</p>
  
  <pre><code>$r-&gt;price_date // data output:  1.00 / 2013-07-13 14:35,2.00 / 2013-07-13 14:35
  </code></pre>
  
  <p>--</p>
  
  <pre><code>@foreach($results as $r)
     &lt;?php
         $price_n_date = explode(',',  $r-&gt;price_date);      
           foreach ($price_n_date as $value) {
             list($price,$date) = explode ('/',$value)
          // How can i compare with day and display value of the day to the column?
           }
    ?&gt;
  @endforeach
  </code></pre>
  
  <p>I have a table which generate 31 column of days 1st to 31st in table header. In tbody, i will loop an item with it's price and date which will be displayed in the day column from 1st to 31st, if the day of date and the day column matched then only show value else will show a dash.</p>
  
  <p>It is something like attendance list, but i am going to show the price changes of the item on the month based on day.</p>
  
  <p>Sample output:
  <a href="https://i.stack.imgur.com/DCqTY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DCqTY.jpg" alt="enter image description here"></a></p>