- Modificato
include('config/connect.php');
$mysqli->query("set names 'utf8'");
//include_once('function/cleanstring.php');
$res = $mysqli->query("SELECT * FROM category ORDER BY id_x ASC ");
$category = array();
while($row = $res->fetch_assoc()) {
$row['id_x'];
$row['name'];
$row['link_name'];
$category[] = $row;
$i=24;
} ?>
<div class="cont-cat">
<div class="row">
<?php
foreach( $category as $category_name):
?>
<div class="col-xs-4 col-sm-4">
<div class="text-center">
<a href="<?php echo PATH_ADS.$category_name['link_name']?>" class="img ctg text-center">
<img src="<?php echo $path; ?>briccobracco/mobile/assets/icon/<?php echo $category_name['link_name'].PNG; ?>" alt="<?php echo $category_name['name']; ?>" />
<p><?php echo $category_name['name']; ?></p>
</a>
</div>
</div>
<?php $i++;
if(($i)%(3)==0): ?>
</div>
</div>
<div class="cont-cat">
<div class="row">
<?php endif;
endforeach;
?>
</div>
</div>
<?php
mysqli_close( $mysqli);
}
Mi trovereste l'errore? @Giulio_M