Arrays

From: Date: Tue, 31 Oct 2000 13:34:13 +0000
Subject: Arrays
Groups: php.general 
Request: Send a blank email to php-general+get-22932@lists.php.net to get a copy of this message
I have a script that calls a class that creates graphs. The paramaters send to the class is formatted like this: $line->y_data['DEF20'] = array(4.896, 4.500, 4.190, 3.050, 2.888, 3.678); But now i want to feed the data from an other array with 12 fields which I get from a database: What I would like to know is: Can I use an array like this: I have the following arrays: $resulta[] and $goala[] $line->y_data['XYZ40'] = array($resulta[1],$resulta[2],$resulta[3],$resulta[4],$resulta[5],$resulta[6 ],$resulta[7],$resulta[8],$resulta[9],$resulta[10],$resulta[11],$resulta[12] ); or like this: $line->y_data['ABC10'] = $goala[1-12]; I don't know if this question is very clear but I hope you guys understand what I mean! With My Best Regards / Med Vänlig Hälsning Jari Ivanoff IS/IT Volvo Cars Uddevalla Phone/Tel: +46-(0)522-80671 Fax: +46-(0)522-80427 Pbx/Växel: +46-(0)522-80000

« previous php.general (#22932) next »