i\'m pretty new to this and not sure how should i do it,
I\'ve got a database with a column called \"names\"
how can i make it display in so?
Lets say you have an array of the names called $names
, then you could do what you wanted with code that looks something like this:
$name";
}
?>
That would put all the names on the same row.
In order to start a new row say, every 3 names, you could put an if statement in the for loop like this:
// assume we have these variables available.
$row_number;
$max_cols = 3;
// this goes at the top of the foreach
if($row_number % $max_cols == 0) {
print '';
}
- 热议问题