2010-07-31 88 views

回答

2

你的意思是这样?

<?php 
$arr = array('home'=>array(
          'living room', 
          'bedroom' 
          ), 
       'office'=>array(
           'conference room', 
           'cubicule', 
          ) 
      ); 
function myFunction ($myArray) { 
    echo "<pre>look nested arrays are passed into functions just like regular arrays, it just works\n". 
     print_r($myArray,true). 
     '</pre>'; 
} 
myFunction ($arr); 

它只是工作。