Silverado_NL Posted February 14, 2007 Share Posted February 14, 2007 hi everybody, im no wonder @ mysql , else i wouldnt be here. but i just made a query and when i do a print_r on the query result. i get the following. Array ( [0] => 1 [uitbel_id] => 1 [1] => 320574 [dossier_nr] => 320574 [2] => De heer [aanspreek] => De heer [3] => A.H.M. [voorletters] => A.H.M. [4] => Coomans [achternaam] => Coomans [5] => 0123456789 [telefoon] => 0123456789 [6] => 0 [status] => 0 [7] => 0 [aantalkeergebeld] => 0 ) as you can see the result are 2x on the screen. i want them to just show up once. anybody know what is going on??? here is my query $query1="SELECT * FROM uitbel_lijst"; $ci_query=mysql_query($query1); $ci_array=mysql_fetch_array($ci_query); print_r($ci_array)."<br>"; thanks in advance!!! Quote Link to comment https://forums.phpfreaks.com/topic/38447-double-result-and-i-dont-know-why/ Share on other sites More sharing options...
shoz Posted February 14, 2007 Share Posted February 14, 2007 mysql_fetch_array returns "an array with both associative and number indices" by default. You can use the second argument to the function to change that or use another function such as mysql_fetch_assoc. $row = mysql_fetch_array($result, MYSQL_ASSOC); $row = mysql_fetch_assoc($result); Quote Link to comment https://forums.phpfreaks.com/topic/38447-double-result-and-i-dont-know-why/#findComment-184566 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.