PHPн

Ȥ

 <?php
 
 $ketsueki[] = "";
 $ketsueki[] = "";
 $ketsueki[] = "";
 
 echo $ketsueki[0];
 echo $ketsueki[1];
 echo $ketsueki[2];
 
 ?>

arrayؿ

 <?php
 
 $ketsueki = array("", "", "");
 
 echo $ketsueki[0];
 echo $ketsueki[1];
 echo $ketsueki[2];
 
 ?>

ɤ߹Ƥ

 <?php
 //ޤarray롣
 $array = new array();
    
 $fp = fopen("sample.txt", "r");
 while ($line = fgets($fp)) {
 
 //arrayɤ߹Ԥ롣
 $array[] = $line; 
 
 echo "$line<br>";
 }
 fclose($fp);
 
 ?>

countؿ

count ؿˤäǿĴ٤뤳Ȥ롣

㤨СǤ򤹤٤ɽϼΤ褦ˤʤ롣

 <?php
 
 $ketsueki = array("", "", "", "");
 $ketsueki = count($ketsueki);
 
 for ($i = 0; $i < $count; $i++) {
   echo "$ketsueki[$i]<br>\n";
 }
 
 ?>


ȥå   ʬ Хåå   ñ측 ǽ   إ   ǽRSS
Last-modified: 2008-07-30 () 21:25:36 (4037d)