Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Simple PHP Array from MySQL row

$
0
0

Hi there,

 

Just a simple question for all you coders.

I'm trying to make a PHP Array from MySQL results.

 

The two rows are 'players' and 'time'. The players row has plain numerical data and time, time postings (11:00 and so on).

 

The output's of the two arrays I'm after are in the formats below :

(example)

1,2,10,5,32,5,0

(example time)

"11:00", "11:15", "11:30",

The code I'm currently attemping with is :

while($row = mysql_fetch_array($mysql_result))
{

     $dataplayers[ $row['players'] ] = array();

     $datatime[ $row['time'] ] = array();
}

As it stands, I seem to be getting no output at all.

 

Thanks for your help in advanced!


Viewing all articles
Browse latest Browse all 13200

Trending Articles