PHP assoc array to class instance
I saw that the conversion from a class instance (object) to associative array is a simple cast : $array = (array) $yourObject; So if i have class A and an associative array contaning the neccesary fields to fill a class A object would it be enough to do the opposite? e.g $aInstance=(A)$assocArray; If not whats the easiest way to do so?
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.