I query and fetch and array from a mysql table. When I print_r($array)
I get the below output. What does it mean when the word "Array" are outputted several times. Does it mean I get 5 arrays or does it mean I have one array? - I am confused, please explain.
My php code
<?php
$results = mysql_query("SELECT * FROM task_list");
while($array = mysql_fetch_array($results)) {
print_r($array);
}
?>
My table info:
CREATE TABLE `task_list` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title_task_DK` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;
Print_r output:
Array
(
[0] => 1
[id] => 1
[1] => Dæk For
[title_task_DK] => Dæk For
)
Array
(
[0] => 2
[id] => 2
[1] => Dæk Bag
[title_task_DK] => Dæk Bag
)
Array
(
[0] => 3
[id] => 3
[1] => Dæk Alm.
[title_task_DK] => Dæk Alm.
)
Array
(
[0] => 4
[id] => 4
[1] => Dæk Indl.
[title_task_DK] => Dæk Indl.
)
Array
(
[0] => 5
[id] => 5
[1] => Slange/Lapning For
[title_task_DK] => Slange/Lapning For
)