1
print_r($que);

输出是这样的:

Array ( [0] => Array ( [0] => PHP allows you to send emails directly from a script [1] => How do you get information from a form that is submitted using the "get" method? [2] => In PHP you can use both single quotes ( ) and double quotes ( " " ) for strings: [3] => What does php stands for ? [4] => The PHP syntax is most similar to: [5] => What is the correct way to connect to a MySQL database? [6] => What is the correct way to include the file "time.inc" ? [7] => In PHP, the die() and exit() functions do the exact same thing. [8] => All variables in PHP start with which symbol? [9] => Include files must have the file extension ".inc" ) )

我需要打印每个元素。

喜欢 $que[0]; 和$que[1];等等。

如果我确实echo "$que[0]";输出结果是Array而不是PHP allows you to send emails directly from a script.

4

1 回答 1

1

$que[0]本身就是一个数组。要访问第一个元素中的第一个元素,$que您需要执行$que[0][0].

于 2013-08-29T00:12:33.773 回答