Hey guys! I was hoping you could point me in the right direction.
wrote a php file that gathers all my user names, ids, and their roles.
user ids are connected to a "role" via a connector table.
for example: ID 1 is connected to Role 1, which is "employee"
However, someone may have 2 or more roles (for example you could be an employee, investor, and manager). you get the point.
Here's how I'm pulling the data:
$x=0;
while ($x < $employee_connect_num) {
$user_id[$x]=mysql_result($employee_connect_results,$x,"person_id");
$user_roles[$x]=mysql_result($employee_connect_results,$x,"role_name");
$x++;
}
Then echo back a table with user name and roles.
The problem is, is that it's listing each person, with each of their roles seperately.
example:
Joe Employee
Joe Investor
Joe Manager
I'm trying to get it to list like:
Joe Employee, Investor, Manager
I've tried a few things and I think i'm just complicating things. How would you guys go about this?
thanks!