php关联数组的访问


$aUrls=array(
            "http://202.112.195.246:8089/isactive",
            "http://202.112.195.245:8089/isactive",
            "http://202.112.195.246:8092/isactive"
        );
      foreach ($aUrls as $id => $url) {
          echo $id.": ".$url.'
'; }



      $sports=array(
        'football'=>'good',
        'swimming'=>'very good',
        'running'=>'great'
        );
      foreach($sports as $key => $value){
        echo $key.': '.$value.'
'; }



















你可能感兴趣的:(php)