herghost Posted March 13, 2010 Share Posted March 13, 2010 Hi All, I think I am going about this slightly backwards but its the only way I can understand it my head: [php <?php]$var = $result; $one = $var[8] . $var[9] . $var[10] . $var[11]; $five = $var[22] . $var[23] . $var[24] . $var[25]; $fifteen = $var[39] . $var[40] . $var[41] . $var[42]; ?>[/code] $results basically equal the load of my server for the last one, five and fifteen seconds. I am trying to turn this into a bar chart using the gd library, but first of all I need to turn $one $five $fifteen Back into an array! How is this possible? Cheers Link to comment https://forums.phpfreaks.com/topic/195111-variables-into-array/ Share on other sites More sharing options...
herghost Posted March 13, 2010 Author Share Posted March 13, 2010 d'oh! $data = array($one,$five,$fifteen); Link to comment https://forums.phpfreaks.com/topic/195111-variables-into-array/#findComment-1025609 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.