Nested Loop in table PHP -


hello new php , trying make table using 2 foreach , not getting output want.

<html>     <head>          <title>didier test</title>     </head>     <body>         <h1>yesso!</h1>     </body>      <table border="1">         <tr>             <th>books</th>             <th>price</th>         </tr>     <tr>      <?php foreach($name $item): ?>         <td><?=$item?></td>         <?php foreach($price $item2): ?>             <td><?=$item2?></td>             </tr>         <?php endforeach; ?>     <?php endforeach; ?>     </table>      </body> </html> 

i know having issue inner foreach, don't know how correct it.

please let me know thanks

well 1 thing closing body tag on line 7, before output table.

<body> <h1>yesso!</h1> </body> 

i don't know why doing nested loop on seemingly non-related data. other need see query.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -