forum

Home / DeveloperSection / Forums / Getting SQL result into an array

Getting SQL result into an array

Anonymous User 2265 08-Jul-2013
Hi Developers!

I'm trying to get a MySQL result like "SELECT * FROM sales" into an array that looks like this:

$data = array( 
         array('Date', 'Sales'),  
         array('June 25', 12.25),  
         array('June 26', 8.00) 
 );

I tried it with a while loop but it didn't work. How can i do this?

Thanks in advance. 

Updated on 08-Jul-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By