Menu
This is gonna be something simple i know it.
Getting this error when trying to create an array from XML information
[code=html]
Warning: Illegal offset type in C:wampwwwPersonaltoolincxmlmodule.php on line 36
Warning: Illegal offset type in C:wampwwwPersonaltoolincxmlmodule.php on line 36
Warning: Illegal offset type in C:wampwwwPersonaltoolincxmlmodule.php on line 36
Array code
[code=php]
function getLocation($xml) {
foreach($xml->result->rowset->row as $value) {
$data[$value->attributes()->numberID] = $value->attributes()->locationID;
}
return $data;
}
Any idea why throwing this error out at me