摘要: 转载:http://blog.sina.com.cn/s/blog_62aa5b530100q8dh.htmlPHP数组添加一个元素的方式: array_push(), arr[], 有两种方式第一种: $arr=array();//定义一个数组 array_push($arr,el1,el2...... 阅读全文
posted @ 2014-12-25 16:30 一菲聪天 阅读(4469) 评论(0) 推荐(0)
摘要: 借鉴:http://blog.sina.com.cn/s/blog_7193eeac0100zwld.html如果想for循环生成变量如: $a1,$a2,$a3....$name = "test"; //这一类的变量就是 test1,test2····for($i=0; $i<3... 阅读全文
posted @ 2014-12-25 16:18 一菲聪天 阅读(3379) 评论(0) 推荐(0)
摘要: $array = array(); 阅读全文
posted @ 2014-12-25 16:15 一菲聪天 阅读(516) 评论(0) 推荐(0)
摘要: 1 '; 5 } 6 7 function show2(){//不给函数传参数,所以使用不了外部变量,报错 8 echo $test.''; 9 }10 11 function show3(){//可以通过$GLOBALS来调用外部变量12 ... 阅读全文
posted @ 2014-12-25 14:24 一菲聪天 阅读(252) 评论(0) 推荐(0)