<?php
$responseData = array (
'id' => 7181676,
'api_request_id' => 20984853,
'user' => 8305,
'vin' => 'JTDKN3DU7D1643423',
'make' => 'Toyota',
'model_name' => 'Prius',
'model_year' => 2013,
'last_updated' => '2019-02-22T01:08:15.628318Z',
'recall_count' => 1,
'status' => 'ok',
'recalls' =>
array (
0 =>
array (
'recall_id' => 15753,
'recall_age' => 0,
'nhtsa_id' => '18V684000',
),
1 =>
array (
'recall_id' => 16733,
'recall_age' => 1,
'nhtsa_id' => '16V684123',
),
),
);
foreach ($responseData['recalls'] as $key => $recall) {
echo "recall $key:\n";
echo "recall id: {$recall['recall_id']}\n";
echo "recall age: {$recall['recall_age']}\n";
echo "nhtsa id: {$recall['nhtsa_id']}\n\n";
}
- Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
- recall 0:
recall id: 15753
recall age: 0
nhtsa id: 18V684000
recall 1:
recall id: 16733
recall age: 1
nhtsa id: 16V684123
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
recall 0:
recall id: 15753
recall age: 0
nhtsa id: 18V684000
recall 1:
recall id: 16733
recall age: 1
nhtsa id: 16V684123
preferences:
168.65 ms | 402 KiB | 212 Q