function objectToArray($object) { $array=array(); foreach($object as $member=>$data) { $array[$member]=$data; } return $array;
If PHP5, then You can cast your object to an array by,
$array = (array) $this;
No comments:
Post a Comment