Display image along with labels in php
<p>I am retrieving an array of book objects with attributes like title,isbn and image. When I wish to display only labels using for loop it is displaying all entries. But when I try to display image, it only displays one. Also when I try to display both title and image, it says can </p>

<p><code>Warning: Cannot modify header information - headers already sent by (output started at     /Applications/XAMPP/xamppfiles/htdocs/BookStore/BooksResult.php:14) in /Applications/XAMPP/xamppfiles/htdocs/BookStore/BooksResult.php on line 15</code>. </p>

<p>Below is the code. </p>

<pre><code>foreach($booksArr as &amp;$book)
{
    $content = $book-&gt;Image;
    $title=$book-&gt;s_Title;                  
    echo $title;
    header('Content-type: image/jpg');
    {
        echo $content;
    }
}
</code></pre>
