Link to home
Start Free TrialLog in
Avatar of aej1973
aej1973

asked on

Array in PHP.

Hello I have a db that has the following data:

Name       Access Level       Mailbox
Tom           Admin                 100
Jones         Admin                 101
Tim            Sales                   102
Jack            Sales                  103
Sarah         Manager           104
James        Manager           105


I am looking for a script that can give me the following output:

Admin  Mailbox
Tom                 100
Jones               101

Sales    Mailbox
Tim                   102
Jack                   103

Manager Mailbox
Sarah                  104
James                  105

Thanks for the help.

A
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aej1973
aej1973

ASKER

Hello Ray, I looking for some help in writing some nested foreach statements. How can I do this?

Thanks,
A
Why would you write nested foreach() statements?  What is the objective?
Avatar of aej1973

ASKER

Got your point. Made the change, thanks.

A
Great - I think it will be easier to program and also to understand the intent of the programming when you revisit it later!  Thanks for using E-E, ~Ray