I currently have the following code : $content = "
$content = "
<name>Manufacturer</name><value>John Deere</value><name>Year</name><value>2001</value><name>Location</name><value>NSW</value><name>Hours</name><value>6320</value>";
I need to find a method to create and array as name=>value . E.g Manufacturer => John Deere. Can anyone help me with a simple code snipped ? I tried some regex but doesn't even work to extract the names or values (e.g
$pattern = "/Manufacturer(.*)/"; preg_match_all($pattern, $content, $matches); $st_selval = $matches[1][0];
) I appreciate your time