Extract Values from stdclass object in php -
this question exact duplicate of:
i have stdclass object below in php :-
$sample = (object) array( "sname" => "test" ,"bselection" => "12345" ,"bind" => "1" ); i need output below -
test123451
please advise how can output above.
since casted object upon declaration, access other normal object, thru -> arrow operator:
echo "{$sample->sname}{$sample->bselection}{$sample->bind}"; several versions work using . or ,:
echo $sample->sname,$sample->bselection,$sample->bind;