inside my database, there is a table name january such as:
id | code | 1 | 2 | 3 | 4
2 | 0000 | X | X | O | O

when i access the data using PHP and parse it into an array e.g. $array1,
It became:
$array[0] -> 2
$array[1] -> X
$array[2] -> X
$array[5] -> O

why? Is there anyway to block the array to use the index as reference?
i tried $array but it also show result as 2...

use function
mysql_fetch_assoc() to get array with column name as key instead of index

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.