data from database with foreach - from top to down

前端 未结 5 617
情话喂你
情话喂你 2021-01-24 19:15

database:

id | name
1  | aaa
2  | bbb
3  | ccc
.. | ...
250| zz3

foreach ($datafromdb as $value){
  echo $value->name();
}

this show me:

5条回答
  •  无人共我
    2021-01-24 19:24

    Look, I don't exactly know php but this is what I can think of:

    
        var counter=0;
        foreach ($datafromdb as $value){
            if (i%12==0) { echo ''; }
            counter++;
        }
        
    '; } echo $value->name()+'
    '; if (i%12==0) { echo '

    Hope this helps!

提交回复
热议问题