Can someone help me with the Grid view?
I am integrating a new design for an old script. Work is fine but as always I had problems with the <div>
I still follow me in the code.
I know it's silly, but I throw away a whole day and I can not put the following in the correct format:
I'm pulling the db data for a price table. As I must play with the php between the html I can not put it to be displayed horizontally. Whatever you do is always vertical. This data auto generates the price tables vertically, I can not design several tables horizontally and insert the data separately. I only have one code that automatically generates in the number of tables configured from admin. And this is my problem, I want to show it horizontally, a grid format. Here I leave the code in case someone can help me or leave me some better idea.
enter the description of the image here
<div class="content">
<div class="container">
<div class="row">
<div>
<h2 class="title"><?=$lang['b_07']?> & <?=$lang['b_247']?>
</h2>
<h5 class="description"><?=$lang['b_395']?></h5>
</div>
</div>
<?php
$packs = $db->QueryFetchArrayAll("SELECT id,coins,price FROM 'c_pack'
ORDER BY 'id' ASC");
if(!$packs){
echo '<div class="msg"><div class="error">'.$lang['b_43'].'</div>
</div>';
}
foreach($packs as $pack){
$price = ($site['c_discount'] > 0 ? number_format($pack['price'] *
((100-$site['c_discount']) / 100), 2) : $pack['price']);
?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<div class="card card-pricing card-raised">
<div class="card-content">
<div class="icon icon-rose">
<i class="material-icons">home</i>
</div>
<h4 class="card-title">
<?=number_format($pack['coins']).' '.$lang['b_42'].' = '.($site['currency_code'] == '' ? get_currency_symbol('USD') :
get_currency_symbol($site['currency_code'])).$price?></br><?=$lang['b_36']?> = <?=($site['c_discount'] > 0 ? ''.get_currency_symbol($site['currency_code']).round($pack['price']/$pack['coins'], 4).''.get_currency_symbol($site['currency_code']).round($price/$pack['coins'], 4).'' : get_currency_symbol($site['currency_code']).round($price/$pack['coins'], 4))?></h4>
<div class="btn btn-rose btn-round" onclick="buyPack(<?=$pack['id']?>); return false"><?=$lang['b_199']?></div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<?php }?>
<div style="clear:both"></div>
<div id="pay_method"></div>
</div>