/** * Check if the element exists in array * @param array $param */ function checkVarFromParam($param, $element) { return utilsBup::xmlAttrToStr($param, $element); /*if (isset($param[$element])) { // convert object element to string return (string)$param[$element]; } else { return ''; }*/ }
public static function xmlNodeAttrsToArr($node) { $arr = array(); foreach ($node->attributes() as $a => $b) { $arr[$a] = utilsBup::xmlAttrToStr($node, $a); } return $arr; }