I am getting an unexpected t_variable on line 64 the return $arrData line.
I'm trying to get the values from the simple_xml_load_string object into an array.
$request = file_get_contents("http://free.apisigning.com/onca/xml?".$allparameter);
$xmlObj = simplexml_load_string($request);
if (strpos($request, NEEDLE)=== false){
$result= $xmlObj->Items->Item->ItemAttributes->ProductGroup;
$category= (string) $result;
}else{
$xml_array=objectsIntoArray($xmlObj);
print_r( $xml_array );
}
function objectsIntoArray($arrData, $arrSkipIndices=array())
{
$arrData = array();
if (is_object($arrObjData)){
$arrObjData=get_object_vars($arrObjData);
}
if (is_array($arrObjData)) {
foreach ($arrObjData as $index->$value ){
if (is_object($value ) || is_array($value)){
$value = objectsIntoArray($value, $arrSkipIndices);
}
if (in_array($index,$arrSkipIndices)){
continue;
}
$arrData[$index]=$value;
}
}
$return $arrData;
}