php - Form Table out of JSON Array -


i've got simple question.

i'm getting php array mysql query , encoded looks this:

[     {         "id": "111111",         "joindate": "2015-05-13",         "nickname": "testuser1"     },     {         "id": "222222",         "joindate": "2015-05-06",         "nickname": "testuser2"     },     {         "id": "333333",         "joindate": "2000-01-01",         "nickname": "testuser3"     } ] 

how can iterate through array , form simple html table?

heres example of outputting array elements in table rows.

foreach ($elements $element) {    echo '<tr><td>'. $element['id'].'</td><td>>'. $element['nickname'].'</td></tr>'; } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -