カテゴリー
PHP

配列の使い方

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="GENERATOR" content="JustSystems Homepage Builder Version 18.0.14.0 for Windows">
<title></title>
</head>
<body>
 <?php
  require_once ("newpage8.php");
  print $APPTITLE;

  $room[0] = "鈴木";
  $room[1] = "佐藤";
  $room[2] = "伊藤";
  $room[3] = "高橋";
  for($i = 0; $i<4; $i++){
    print $room[$i] . "<BR>";
  }

  print "$APPFOOTER";

?>

<p><a href="newpage10.php">書き込みインデックスへ戻る</a></p>
</body>
</html>

変数名に$が付くようです。タイプは無いようですね。

inserted by FC2 system