我是PHP的菜鸟,我想在每一行中使用foreach语句显示非空值,代码如下,非常感谢您的支持
<?php
foreach ($customer['Stocks'] as $stock ) { ?>
<tr>
<td><?php echo $stock['stsymbol']?><td>
<td><?php echo $stock['noshares']?><td>
<td><?php echo $stock['purchaseprice']?><td>
<td><?php echo $stock['datepurchased']?><td>
<td><?php echo $stock['Original Value']; ?><td>
<td><?php echo $stock['Current Price'];?><td>
<td><?php echo $stock['Current Value']?><td>
<?php } // end foreach ?>