Php loop table implementation of one row and two columns display method, table two columns _ PHP Tutorial

Source: Internet
Author: User
Php cyclically implements the display of one row and two columns in table. Php looping table implements the display of one row and two columns. tablecellspacing1cellpadding0trtdaligncenterbgcolor # F php looping table implements the display of one row and two columns.
 
 
 
     <? Php $ setarr = array (,); // equivalent to the array obtained by the database $ I = 0; foreach ($ setarr as $ val) {$ I ++;?> <? = $ Val?> <? Php if ($ I % 2 = 0 & $ I 
   
     ';}?> 
   
First column Column 2

For example, if it is another character type, function conversion is required:

<?php$str = "Hello world. It's a beautiful day.";print_r (explode(" ",$str));?>

Result:

Array([0] => Hello[1] => world.[2] => It's[3] => a[4] => beautiful[5] => day.)

Partition table width = "100%" border = "0" cellspacing = "1" cellpadding = "0" style = "background: # CCC "tr td align =" center "bgcolor =" # F...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.