<?php
$str1 = array("key1"=>"aa","key2"=>"bb","key3"=>"cc");
echo "配列サイズ:" . array_unshift( $str1,"zz","xx") . "\n";
var_dump( $str1 );
?>
●実行結果
配列サイズ:5
array(5) {
[0]=>
string(2) "zz"
[1]=>
string(2) "xx"
["key1"]=>
string(2) "aa"
["key2"]=>
string(2) "bb"
["key3"]=>
string(2) "cc"
}
|