TIL: You can convert arrays to objects in various ways:
$obj = (object) $array;
$obj = json_decode(json_encode($array));
$object = new stdClass();
foreach ($array as $key => $value) {
$object->$key = $value;
}
TIL: You can convert arrays to objects in various ways:
$obj = (object) $array;
$obj = json_decode(json_encode($array));
$object = new stdClass();
foreach ($array as $key => $value) {
$object->$key = $value;
}