2 December 2017 · 1 min read How to Cast an Array to an Object with PHP #php #array #object #snippet It's short and sweet. $obj_from_array = (object)['key'=>'val']; echo $obj_from_array->key;
Comments