jadjoubran / codetogo.io

🚀 JavaScript code to go - Find updated snippets for common JavaScript use cases
https://codetogo.io
MIT License
233 stars 30 forks source link

Use Case Suggestion: $object = new stdClass() #363

Open omaralsaroot opened 6 months ago

omaralsaroot commented 6 months ago

$object = new stdClass();

$object->name = “Rahul”;

$object->age = 30;

$object->city = "Dehradun";

$object_JSON = json_encode($myObj);

echo $object_JSON;