PHP How to Create Stdclass Object

We need to use “object”.

[php]
$array = array(
"title" => "Harry Potter and the Prisoner of Azkaban",
"author" => "J. K. Rowling",
"publisher" => "Arthur A. Levine Books",
"amazon_link" => "http://www.amazon.com/dp/0439136369/"
);

$books = (object) $array;

print_r($books);
[/php]

std-object-output