Home | Mirror | SearchITEYE 博客 | OSChina 博客 | 51CTO 博客

2.6. Array 數組

數據相關函數

2.6.1. 刪除數組元素

$a[]="a1";
$a[]="a2";
$a[]="a3";
print_r($a);
unset($a[1]);
print_r($a);
		

2.6.2. 數組與字元串操作

implode(separator,array)

		
<?php
$arr = array('Hello','World!');
echo implode(" ",$arr);
?>
		
		

explode(separator,string,limit)

		
<?php
$str = "Hello world!";
print_r (explode(" ",$str));
?>
		
		
comments powered by Disqus