php assign value to object
snippet in php

php assign value to object

user4793

// $object->property = 'value';

// assigning a string
$person->first_name = 'John';
$person->last_name = "Doe";

// assigning a number - notice we don't have quotes around 32
$person->age = 32;