![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
getting associative array to output correct including missing valueI have an associative array that looks like
Code:
What I'm trying to do is come up with a loop (to use in a graphing program XML-SWF Charts) which will produce a table like June July Smith 104 310 Brown 316 0 Doe 0 36 which is a listing like begin graph_user_hpcx_last_name: Smith Brown Doe end graph_user_hpcx_last_name: begin graph_user_hpcx_Accounting_Month = 6 June 104 316 0 end_graph_user_hpcx_Accounting_Month = 6 begin graph_user_hpcx_Accounting_Month = 7 July 310 0 36 end_graph_user_hpcx_Accounting_Month = 7 I've tried to make an array of all the last names PHP Code:
then looping through all my results to see if it matches a name, if so print the units, if not print 0 but I get way two sets for each name (cause of the 6 and 7 month) PHP Code:
Any suggestions on how best to get this? Been reading all I can and am still stumped! Last edited by LuciWiz : 20-Sep-2006 at 08:20.
Reason: Please insert your Php code between [php] & [/php] tags
|
|||
|
#2
|
||||
|
||||
Re: getting associative array to output correct including missing valueAre you still having trouble getting the loop to work right?
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: getting associative array to output correct including missing valuenever figured it out- so went in and set the column in the database to 0
|
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bit stuffing | agnostos | C Programming Language | 17 | 12-Sep-2006 20:10 |
| Need help deleting the last element in the array | headphone69 | C++ Forum | 2 | 15-Mar-2006 19:31 |
| C++ PhoneBook | marita | C++ Forum | 46 | 12-Jun-2005 12:10 |
| template comiling problems - need expert debugger! | crq | C++ Forum | 1 | 01-Feb-2005 21:26 |
| using vector or array | oshiotse | C++ Forum | 4 | 16-Apr-2004 10:59 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The