Re: SimpleXMLElement Object into array
- From: Jonathan Stein <jstein@xxxxxxxx>
- Date: Fri, 03 Oct 2008 12:20:19 +0200
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
.
- References:
- SimpleXMLElement Object into array
- From: rodeored
- SimpleXMLElement Object into array
- Prev by Date: Re: I need advice on how to create thousands of articles with PHP or else
- Next by Date: Re: SOAP Call with multiple occurences of an element
- Previous by thread: SimpleXMLElement Object into array
- Next by thread: Re: SimpleXMLElement Object into array
- Index(es):