<html>
<head>
<title>无标题文档</title>
</head>
<body>
<?
$arr_books = array(
'book1' => array(
'name' => 'The Demolished Man',
'pages' => 243,
'publisher' => 'Vintage Books'
),
'book2'=> array(
'name' => 'Children of the Mind',
'pages' => 349,
'publisher' => 'Tor Books'
)
);
echo $arr_books['book1']['name'];
?>
</body>
</html>
<head>
<title>无标题文档</title>
</head>
<body>
<?
$arr_books = array(
'book1' => array(
'name' => 'The Demolished Man',
'pages' => 243,
'publisher' => 'Vintage Books'
),
'book2'=> array(
'name' => 'Children of the Mind',
'pages' => 349,
'publisher' => 'Tor Books'
)
);
echo $arr_books['book1']['name'];
?>
</body>
</html>
呵呵,是呀!
不过你的
'name' => 'The Demolished Man',
'pages' => 243,
中,结尾的逗号就是不一样呀