Organizational Research By

Surprising Reserch Topic

why do i get resource id 4 when i apply print r to an array in php


why do i get resource id 4 when i apply print r to an array in php  using -'php,mysql,arrays'


  Possible Duplicate:
¬†¬†How do i ‚Äúecho‚ÄĚ a ‚ÄúResource id #6‚ÄĚ from a MySql response in PHP? ¬†




Below is the code:

$result=mysql_query("select * from choices where a_id='$taskid'")or die(mysql_error());
print_r($result);


I get "Resource id #4", any idea?

After I added

while($row=mysql_fetch_assoc($result))
{ print_r($row); }


I just got []

What's wrong?
    
asked Oct 11, 2015 by ashish singh
0 votes
8 views



Related Hot Questions



Government Jobs Opening


...