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" ) )
我需要打印每个元素。
LIKE $ que [0];和$ que [1];等等。
如果我echo "$que[0]";
输出结果为Array
而不是PHP allows you to send emails directly from a script
。
答案 0 :(得分:1)
$que[0]
本身就是一个数组。要访问$que
第一个元素中的第一个元素,您需要执行$que[0][0]
。