Re: SimpleXMLElement Object into array



rodeored skrev:

How do I put the value of an SimpleXMLElement Object into any array

You might need to type cast the values (either implicit or explicit).

if I echo $title, it says "Mother" but if I put it in an array
$myarray=array($title);

It looks like you can directly cast $title to be an array:
$myarray = (array)$title;

- for other purposes you could also consider:
$myarray = array( (string)$title );

Regards

Jonathan
.