PHP object default return value

vinodg

New Member
I have a function which returns object array like that:\[code\]<?phpfunction sth(){ return (object) array( "obj1" => $obj1, "obj2" => $obj2, "obj3" => $obj3 );}$obj = sth();echo $obj;?>\[/code\]Here I want to define $obj's default value.It will return default value instead of $obj1,$obj2,$obj3. How can I define a default value?
 
Back
Top