Answer the question
In order to leave comments, you need to log in
How to enter data from the cycle into one table model?
Retrieving data from the database using a while loop:
while ($row = $db->get_row()) {
echo "<a href='/user/".$row['name']."'>".$row['name']."</a>, " ;
}
Answer the question
In order to leave comments, you need to log in
$names = [];
while ($row = $db->get_row()) {
$names[] = $row['name']
echo "<a href='/user/".$row['name']."'>".$row['name']."</a>, " ;
}
//... сортируйте как вам надо
foreach ($names as $name) {
echo $name;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question