<?php
$str1 = array("key1"=>"aa","key2"=>"bb","key3"=>"cc");
$ret = array_splice($str1,1,2);
print '----- $str1 -----'."\n";
var_dump( $str1);
print '----- $ret -----'."\n";
var_dump( $ret);
?>
●実行結果
----- $str1 -----
array(1) {
["key1"]=>
string(2) "aa"
}
----- $ret -----
array(2) {
["key2"]=>
string(2) "bb"
["key3"]=>
string(2) "cc"
}
|