$book = new stdClass;
$book->title = “Harry Potter and the Prisoner of Azkaban”;
$book->author = “J. K. Rowling”;
$book->publisher = “Arthur A. Levine Books”;
$book->amazon_link = “http://www.amazon.com/dp/0439136369/”;

여기를 참고.

배열인 경우 $book = array() 로 처리하면 되며 오브젝트인 경우 위와 같이 $book = new stdClass 로 처리할 수 있다.