Hi community,
I have some question regarding assigning values from array to object.
After assigning value from array to object…i tried to print the object
it gave me below output. it s really magic… i dont know how it return array values as Xml …any guess or any help?
common\models\PhoPerson Object ( [_attributes:yii\db\BaseActiveRecord:private] => Array ( [person_pho_id] => SimpleXMLElement Object ( [0] => C859ED75EDF4EEE4 ) [person_vname] => SimpleXMLElement Object ( [0] => chandran ) [person_fname] => SimpleXMLElement Object ( [0] => Nepolean ) [person_title] => SimpleXMLElement Object ( [0] => BE ) [person_email] => SimpleXMLElement Object ( [0] => chandran@aoe.at ) [person_role] => SimpleXMLElement Object ( [0] => LB ) [person_roledesc] => SimpleXMLElement Object ( [0] => programming ) [person_offtel] => SimpleXMLElement Object ( ) [person_picturl] => [person_infourl] => SimpleXMLElement Object ( [0] => https://www.online.a…d=DEFDDEDF4EEE4 ) ) [_oldAttributes:yii\db\BaseActiveRecord:private] => [_related:yii\db\BaseActiveRecord:private] => Array ( ) [_errors:yii\base\Model:private] => [_validators:yii\base\Model:private] => [_scenario:yii\base\Model:private] => default [_events:yii\base\Component:private] => Array ( ) [_behaviors:yii\base\Component:private] => Array ( ) )
Because of this i am getting validation error …
all fields (person_vname,person_fname and etc[size="2"]) should be string… I can see what is the problem… because it is [/size]SimpleXMLElement object…
I dont know how to solve this problem… anybody faced same kind of problem.?