Answers for "how to make an object in php and add to it"

PHP
3

make a object php

$object = new stdClass();
   $object->property = 'Here we go';

   var_dump($object);
   /*
   outputs:

   object(stdClass)#2 (1) {
      ["property"]=>
      string(10) "Here we go"
    }
   */
Posted by: Guest on May-04-2020

Code answers related to "how to make an object in php and add to it"

Browse Popular Code Answers by Language