- array_combine: documentation ( source)
- print_r: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$variable= "'Body;Style'=>'SEDAN;4 DOOR';'CD Player'=>'PRESENT';'Color'=>'GRAY';'Engine Size'=>'3.0L V6 FI F';'Air Bags'=>'4';'Radio'=>'PRESENT';'Tape Deck'=>'N/A';'Estimated Repair Cost'=>'5518';'ACV'=>'6122';'Driver Airbag'=>'INTACT';'Passenger Airbag'=>'INTACT';'Left Side Airbag'=>'INTACT';'Right Side Airbag'=>'INTACT';'VIN Status'=>'OK';'Interior Color'=>'GRAY';'Airbag'=>'INTACT';'KeyFob'=>'PRESENT';";
if (preg_match_all("/'(.*?)'=>'(.*?)';/", $variable, $matches)) {
$result = array_combine($matches[1], $matches[2]);
print_r($result);
}