function CreateBookTables($types) { $bookModel = new BookModel(); $bookArray = $bookModel->GetBookByType($types); $result = ""; foreach ($bookArray as $key => $book) { $result = $result . "<table class = 'bookTable'>\n <tr>\n <th rowspan='8' width = '200px' ><img runat = 'server' src = '{$book->BookImg}' /></th>\n \n \n <th width = '75px' >BookId : </th>\n <td>{$book->BookId}</td>\n </tr>\n \n <tr>\n <th width = '75px' >Book Name : </th>\n <td>{$book->BookName}</td>\n </tr>\n \n <tr>\n <th>Author name : </th>\n <td>{$book->AuthorName}</td>\n </tr>\n \n\n <tr>\n <th>Category : </th>\n <td>{$book->Category}</td>\n </tr>\n \n\n <tr>\n <th>Price : </th>\n <td>{$book->Price}</td>\n </tr>\n \n\n \n \n\n <tr>\n <th>Published Year : </th>\n <td>{$book->PublishedYear}</td>\n </tr>\n \n\n <tr>\n <th>Edition : </th>\n <td>{$book->Edition}</td>\n </tr>\n \n\n <tr>\n <th>Availability : </th>\n <td>{$book->Availability}</td>\n </tr>\n \n \n \n \n </table>"; } return $result; }