an array of this nature
array() { [0] => { array(3) { ["pk"]=> string(8) "Abonents" ["fields"]=> array(11) { ["sms"]=> string(12) "+71234567890" ["name"]=> string(52) "Петров Петя Петрович" } } array of rest api curl takes from billing, I try to do a search by phone number and output the values of that fields array in which there is this script number like this:
`<?php <style type="text/css"> table { border-collapse: collapse; } table th, table td { padding: 0 5px; border: 1px solid #000; text-align: center; } </style> <table> <tr> <td rowspan="2"></td> <td colspan="4"></td> </tr> <tr> <td>ФИО</td> <td>Номер телевона</td> <td>Номер договора</td> <td>Аккаунт ID</td> </tr> <?php $phone = "+79122075335"; foreach ($extract as $key => $value) { if($value == $phone) { echo '<tr> <td>'.$key['fields']['create_date'].'</td> <td>'.$key['fields']['name'].'</td> <td>'.$key['fields']['sms'].'</td> <td>'.$key['fields']['contract_number'].'</td> <td>'.$key['fields']['account_id'].'</td> <td></td> </tr>'; } } ?> </tbody> </table>` but I have an empty table, please tell me where is the error, I'm new to php ...