¡@¼ÊºÙ: ¤p»x ¡@ÀY»Î: ´¿¸g¤]¬O¤ô¹q¤u
ºÞ²zû
- ©«¤l
- 1190
- ¥DÃD
- 394
- ºëµØ
- 113
- ¿n¤À
- 1747
- ÂI¦W
- 1
- §@·~¨t²Î
- Vista
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 200
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2024-11-25
|
¤Gºû°}¦Cªº¦s¨ú
n¦s¨ú¤Gºû°}¦C¤¸¯Àªº¸ê®Æ«Ü²³æ¡A´N¦p¦P³B²z¤@ºû°}¦C¡A¤£¹L¡A§ÚÌ¥²¶·¦P®É«ü©w¤¸¯Àªº¦Cµù¼Ð»P¦æµù¼Ð¡A¨Ò¦p¡G- $Myarray [0][1] = 999; //±N¸ê®Æ¦s©ñ¸m°}¦C¦ì¸m[0][1]¤¤
- $Myarray[1][2] = 888; //±N¸ê®Æ¦s©ñ¸m°}¦C¦ì¸m[1][2]¤¤
- //¨ú¥X°}¦C¦ì¸m[0][1]»P[1][2]ªº¸ê®Æ¬Û´î¡A¨Ã¦s¦Ü°}¦C¦ì¸m[3][3]¤¤
- $Myarray[3][3]= $Myarray[0][1]- $Myarray[1][2];
½Æ»s¥N½X ¦pªGn¥H°j°é±Ôz¨Ó¦s¨ú¤Gºû°}¦Cªº¸ê®Æ¡A«h¥²¶·¨Ï¥Î±_ª¬ªº°j°é¡A§ÚÌ¥Hfor±_ª¬°j°é¿é¥X¤Gºû°}¦C¤ºªº¸ê®Æ¨Ó»¡©ú¡G
- <HTML>
- <HEAD>
- <TITLE>ex04_13</TITLE>
- </HEAD>
- <BODY>
- <?
- $Student=array(
- "0"=>array(0=>"©m¦W",1=>"°ê¤å",2=>"^¤å",3=>"¼Æ¾Ç"),
- "1"=>array(0=>"¤p»x",1=>100,2=>90,3=>80),
- "2"=>array(0=>"±oµØ",1=>60,2=>100,3=>70),
- "3"=>array(0=>"«F«Ê",1=>90,2=>80,3=>90),
- "4"=>array(0=>"¾Ç¦³",1=>65,2=>90,3=>80));
- ?>
- <table border=1>
- <?
- $i=count($Student);
- for($x=0;$x<$i;$x++)
- {
- echo "<tr>";
- $j=count($Student[$x]);
- for ($y=0;$y<$j;$y++)
- {
- echo ("<td>" . $Student[$x][$y] . "</td>");
- }
- echo "</tr>";
- }
- ?>
- </table>
- </BODY></HTML>
½Æ»s¥N½X ¹ï©ó³sÄòµù¼Ðªº¤Gºû°}¦C¨Ï¥Î±_ª¬for°j°é¥i¥H»´©öªº¸Ñ¨M¡A¦ý¬OY¹ï©ó«D³sÄòµù¼Ð©Î¦r¦êµù¼Ðªº°}¦C´N¦æ¤£³q¤F¡A¦¹®Én§ï¥Î±_ª¬ªºforeach°j°é¤~¯à¸Ñ¨M¡A¨Ò¦p¡G- <HTML>
- <HEAD>
- <TITLE>ex04_14</TITLE>
- </HEAD>
- <BODY>
- <table border=1>
- <?
- $Student=array(
- "¤p»x"=>array("a"=>100,2=>90,"b"=>80),
- "±oµØ"=>array(1=>60,"c"=>100,3=>70),
- "«F«Ê"=>array("d"=>90,2=>80,"e"=>90));
- foreach ($Student as $key=>$value)
- {
- echo "<tr>";
- foreach ($value as $key1=>$value1)
- {
- echo "<td>¤¸¯Àµù¼Ð: $key,$key1 ; ¤¸¯ÀÈ: $value1 </td>";
- }
- echo "</tr>";
- }
- ?>
- </table>
- </BODY></HTML>
½Æ»s¥N½X
|
|