数组键相同但是为值添加值?

时间:2011-02-15 04:42:41

标签: php arrays

This my array....  

         Array
        (
            [a1]=>'k'
            [a2]=>'a' 
            [a3]=>'w'
            [a4]=>'z'

         }

i want     Array
        (
            [a1]=>'k,a' 
            [a3]=>'w'
            [a4]=>'z'

         }

1 个答案:

答案 0 :(得分:1)

$arr = ...;
unset($arr['Â 7'], $arr['Â 11']);
$arr[6]  = 7;
$arr[10] = 11;