Archive

Posts Tagged ‘php object’

Create PHP object without class

July 20th, 2013 No comments

Within JavaScript, you can easily create an object without the class as follows:

myObj = {};
myObj.abc = "Here we go";

Within PHP, you can do the following:

$myObj = new stdClass();
$myObj->abc = 'Here we go';