I'm looking to resolve a PHP deprecation issue with a shipping module - and I'm not a coder, so I'm leaning on the brains trust here to help me get a useful Australian shipping module working.

The code was developed under PHP v5.6, and I need it to be compatible with PHP v7.4

The following code is what exists:

PHP Code:
 $json_array=json_decode($responset,true); 
 
$carriers_result=$json_array['result'];

while(list(
$key,$val)=each($carriers_result)){
    
$methods[] = array('id' =>  $val['QuoteRateID'],'title' => $val['carrier_nm'] ." - ".$val['service_nm']."           ETA  - ".$val['ETA_DAY'] .'days',
//    'Display' => $val['carrier_nm'] ." - " .$val['service_nm']."            ETA  -.$val['ETA_DAY'] .' days',
'cost' => $val['total_charge']
); 

//    exit; 
It's probable that once this error is resolved, more PHP deprecation issues will raise their head as I step my way through this.

All help appreciated

Thanks