1--TEST--
2mysqli_fetch_array()
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifemb.inc');
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11	require('table.inc');
12
13	if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 5")) {
14		printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
15	}
16	print "[002]\n";
17	var_dump(mysqli_fetch_array($res, MYSQLI_ASSOC));
18	mysqli_free_result($res);
19
20	if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 5")) {
21		printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
22	}
23	print "[004]\n";
24	var_dump(mysqli_fetch_array($res, MYSQLI_ASSOC));
25	mysqli_free_result($res);
26
27	mysqli_close($link);
28	print "done!";
29?>
30--CLEAN--
31<?php
32	require_once("clean_table.inc");
33?>
34--EXPECTF--
35[002]
36array(2) {
37  [%u|b%"id"]=>
38  %unicode|string%(1) "1"
39  [%u|b%"label"]=>
40  %unicode|string%(1) "a"
41}
42[004]
43array(2) {
44  [%u|b%"id"]=>
45  %unicode|string%(1) "1"
46  [%u|b%"label"]=>
47  %unicode|string%(1) "a"
48}
49done!
50