php案例2——使用者列表頁

來源:互聯網
上載者:User

標籤:ext   head   type   doc   bsp   char   height   title   live   

一.使用者列表頁

 1 <?php 2     $userInfo[]=array(‘id‘=>‘1‘,‘username‘=>‘clive1‘,‘sex‘=>‘男‘,‘age‘=>‘20‘); 3     $userInfo[]=array(‘id‘=>‘2‘,‘username‘=>‘clive2‘,‘sex‘=>‘男‘,‘age‘=>‘20‘); 4     $userInfo[]=array(‘id‘=>‘3‘,‘username‘=>‘clive3‘,‘sex‘=>‘男‘,‘age‘=>‘20‘); 5     $userInfo[]=array(‘id‘=>‘4‘,‘username‘=>‘clive4‘,‘sex‘=>‘男‘,‘age‘=>‘20‘); 6     $userInfo[]=array(‘id‘=>‘5‘,‘username‘=>‘clive5‘,‘sex‘=>‘男‘,‘age‘=>‘20‘); 7 ?> 8 <!DOCTYPE html> 9 <html>10 <head lang="en">11     <meta charset="UTF-8">12     <title>使用者列表頁</title>13 </head>14 15 <body>16     <h3 style="text-align:center;">使用者列表頁</h3>17     <table style="margin:0 auto;border:1px solid;width:80%;">18         <tr style="text-align:center;">19             <td>編號</td>20             <td>使用者名稱</td>21             <td>性別</td>22             <td>年齡</td>23             <td>頭像</td>24         </tr>25         <?php foreach ($userInfo as $val){26          ?>27             <tr style="text-align:center;">28             <td><?php echo $val[‘id‘]; ?></td>29             <td><?php echo $val[‘username‘]; ?></td>30             <td><?php echo $val[‘sex‘]; ?></td>31             <td><?php echo $val[‘age‘]; ?></td>32             <td><img src="1.jpg" width="50" height="50"/></td>33         </tr>34          <?php }35          ?>36 37     </table>38 39 40 </body>41 </html>

 

php案例2——使用者列表頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.