Outputing JSON to an HTML table using PHP

后端 未结 2 1452
礼貌的吻别
礼貌的吻别 2021-01-27 23:45

I using bootstrap datatables to display data from an API in a table. Here is the data:

{
  \"response_status\": {
    \"status_code\": 0,
    \"status_message\":         


        
2条回答
  •  野性不改
    2021-01-28 00:18

    Assume that your data is stored in $data variable, your code should be like this:

    response_status->status_message as $message) : ?>
        
    Reg No Company Office Phone Number Postal Address Postal Code
    reg_number; ?> company; ?> office; ?> phone_number; ?> postal_address; ?> postal_code; ?>

    提交回复
    热议问题