Terminology

Facts, Thoughts and Opinions

Convert PHP object to associative array

Convert PHP object to associative array by casting it with the array keyword.

$array =  (array) $object;

Create a PHP object without a class definition.

$x = (object) array('field1'=>'A', 'field2'=>'B');

Images

[[/div]]
  •   Subtopics

  •   Writings

  Sources & Bookmarks

Name/Link Date