\>多维数组的建立 \>\>对于多维数组来说,同样需要多级索引来定位元素 **[html]** [view plain](http://blog.csdn.net/estom_yin/article/details/51920304) [copy](http://blog.csdn.net/estom_yin/article/details/51920304) 1. **\** 2. 3. **\\**行数 \$row**\\**"; 14. echo "**\**"; 15. for (\$col = 0; \$col **\<** **3**; \$col++) { 16. echo "**\**".\$cars[\$row][\$col]."**\**"; 17. } 18. echo "**\**"; 19. } 20. **?\>** 21. 22. **\** //这些代码也说明了一个问题,使用php可以直接输出html格式并显示 \>日期 PHP中Date(format, timestamp) timestamp 规定时间戳,默认是当前时间 format 规定时间格式 d月中某天 m某月 y某年 l周里某天 h带有首位零的12小时格式 i带有首位零的分钟格式 s带有首位零的秒 a小写的五千后午后 date_default_timezone_set("Asia/Shanghai")//修改时区 mktime(hour, minute, second, month, day, year)//设定时间戳 strtotime(变化时间, now开始时间)//创建日期时间 //代码实现了输出周六的日期。 使用了date的时间戳,使用了灵活设定strtotime的变化时间 **[html]** [view plain](http://blog.csdn.net/estom_yin/article/details/51920304) [copy](http://blog.csdn.net/estom_yin/article/details/51920304) 1. **\**"; 7. \$startdate = strtotime("+1 week", \$startdate); 8. } 9. **?\>** //代码实现了距离12月31还剩下的时间 **[php]** [view plain](http://blog.csdn.net/estom_yin/article/details/51920304) [copy](http://blog.csdn.net/estom_yin/article/details/51920304) 1. \