php how to convert object with data as string code example
Example 1: object to string php
(string)$yourObject;
Example 2: php object to string
__toString() & {$this->name}
(string)$yourObject;
__toString() & {$this->name}