php html 里if,foreach写法 <?php foreach($data as $k=>$v):?> 你的html <?php endforeach; ?> <?php if($data as $k=>$v):?> 你的html <?php endif; ?>