The simplest and most common approach, use type casting (the explicit conversion of a value from one data type to another)
$array = [
"id" => "1000",
"name" => "Abdullah",
];
$object = (object) $array;
print_r($object);
The simplest and most common approach, use type casting (the explicit conversion of a value from one data type to another)
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.