i've got a db table which gets filled by a submit form.
the table consists of ID, usr_ID, name, and a lot more. i'm in the middle of making a custom table list in wordpress, and well.. i'm not the best at foreach.
how would i go about looping thru and only display each name and usr_id once when
example:
row 1:
id = 1, usr_id = 5, name = Alexander
row 2;
id = 2, usr_id = 4, name = james
row 3;
id = 3, usr_id = 5, name = Alexander
row 4
id = 4, usr_id = 4, name = james
how would i make a foreach statement that would print out:
usr_id = 5, name = Alexander
usr_id = 4, name = james
the purpose for the is to make each name clickable and then make a foreach statement only for the specific usr_id clicked on to see what has been submitted by each individual user