i want single table multiple rows record show in single row i have code running which is showing multiple records on different rows i want to display items on single row.for example i want to display 4 products on a single row i am attaching running code which echo result like this
product 1
product 2
product 3
product 4
what i want with this code to do it echo like that
product 1 product 2 product 3 product 4
hope so you guys understand what i want to do.
$results = $mysqli->query("SELECT * FROM products ORDER BY id desc");
if ($results) {
//fetch results set as object and output HTML
while($obj = $results->fetch_object())
{
echo '<div class="product">';
echo '<form method="post" action="cart_update.php">';
echo '<div class="product-thumb"><img src="img/'.$obj->product_img_name.'"></div>';
echo '<div class="product-content"><h3>'.$obj->product_name.'</h3>';
//echo '<div class="product-desc">'.$obj->product_desc.'</div>';
echo '<div class="product-info">';
echo 'Price '.$currency.$obj->price.' | ';
echo 'Qty <input type="text" name="product_qty" value="1" size="3" />';
echo '<button class="btn btn-warning btn-xs"">Add To Cart</button>';
echo '</div></div>';
echo '<input type="hidden" name="product_code" value="'.$obj->product_code.'" />';
echo '<input type="hidden" name="type" value="add" />';
echo '<input type="hidden" name="return_url" value="'.$current_url.'" />';
echo '</form>';
echo '</div>';
}
}