php配列インスタンスphp配列の定義方法

1456 ワード

php定義配列の例、php配列の定義方法.
1つのphpは配列の例について、配列の基本的な使用を簡単に説明し、例に注釈を加えた.
<?php 



//         

$fruit = array(\"apple\",\"orange\");

//      

$fruit[0];//     apple

$fruit[1];//     orange

//  ,       0   ,  c  java       。

//      www.jbxue.com

//          

$number = array(1,2,3,4,5);//        



//          

$mix = array(1,\"example\",\"hello\",2.5);//        



//            

$ex = array(\"a\"=>\"  \",\"b\"=>\"  \");

//       

$ex[\"a\"];//        

$ex[\"b\"];//        

//                

?>