title: How to insert table rows in a foreach loop in a blade.php file in laravel 5.2?
body: <p>I have created a view page where I am getting an Eloquent variable from my controller. That variable points to the elements in a table. This is my current code.</p>
  
  <pre><code>  &lt;table border="0px"&gt;
      &lt;tr&gt;
      @foreach ($teacher as $value) 
          &lt;?php    
              $tid = $value-&gt;teacherID;
          ?&gt;
  
          &lt;tr&gt;
              &lt;td&gt; &lt;a href="info/{{ $tid }}"&gt; {{ $value['teacher_name'] }} &lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;{{ $value['course_name'] }}&lt;/td&gt;
          &lt;/tr&gt;
          &lt;hr&gt;
  
      @endforeach
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I am getting an unexpected output with this code. I am getting number of blank spaces in the beginning and then my table(mysql) elements. Please help me resolve the issue guys. 
  Thanks,
  Regards.</p>