> 2008/01/06 (日) 23:08:27 ◆ ▼ ◇ [qwerty]> > 今忙しい
> $contents = array(
> "name_hoge" => array( "type" => "1" , "flg" => "1" )
> "name_hage" => array( "type" => "1" , "flg" => "0" )
> "test_popo" => array( "type" => "0" , "flg" => "1" )
> .
> .
> .
> "kuso_poge" => array( "type" => "2" , "flg" => "1" )
> )
> この$contentsを、以下のような$newcontentsにコピーしたいんです
> $newcontents = array(
> array( "checked" , "NULL" , "NULL" ) //name_hogeを指す
> array( "NULL" , "NULL" , "cehcked" ) //name_hageを
> array( "NULL" , "NULL" , "NULL" ) //test_popo
> .
> .
> .
> array( "NULL" , "checked" , "NULL" ) //kuso_poge
> )
> どうすれば$contentsを$newcontentsにコピーできるんでしょうか
$newcontents = clone $contents;
参考:2008/01/06(日)23時06分24秒