Jump to content

Array


klinmy

Recommended Posts

Hi, i would need this type of array data e.g. $new=array(12,23,9,2) to be used to plot the graph (axis-y), $plot = new BarPlot($new);

 

however, if the array data is retrieved from the database, how can i map the retrieved data (eg: temperature = 21, 20, 19, 15) into $new = array (21,20,19,15)?

while ($row = mysql_fetch_assoc($result)) 
	{	

	$temp = $row["Temperature"];


	}

 

it retrieved the data as (21201915), what should i do to map this into $new=array (21,20,19,15).

 

thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/155374-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.