How to display two table columns per row in php loop

前端 未结 4 1216
無奈伤痛
無奈伤痛 2020-12-03 08:36

I would like to display data, two columns per row during my foreach. I would like my result to look like the following:

 ';
  echo '';
  if (fmod($i,2)) echo '';
  $i++;
  }

this will output TR (row) each second time

ps: i haven't tested the code, so maybe you will need to add ! sign before fmod, if it doesn't output TR on first iteration, but on second iteration in the beginning...

提交回复
热议问题
V
4条回答
',$value,'