October 1, 2013

Array to Object – Start with PHP OOP

PHP: Hypertext Preprocessor

<?php
$obj = (object) array('web' => 'wdwd', 'game' => 'HOAB HTML5');
echo $obj->web; // prints 'wdwd'
echo $obj->game; // prints 'HOAB HTML5'
?>

Last updated: March 19, 2014