codetogo.io
codetogo.io copied to clipboard
Use$object = new stdClass(); $object->name = “Rahul”; $object->age = 30; $object->city = "Dehradun"; $object_JSON = json_encode($myObj); echo $object_JSON; Case Suggestion: $object = new stdClass()