Question regarding PHP script

Hello,

I have used the PHP script (http://www.kirupa.com/web/xml_php_parse_beginner.htm) for parsing an XML file.

My XML file is

<SAMPLE>
<num>one</num>
<num>two</num>
<num>three</num>
<num>four</num>
<num>five</num>
</SAMPLE>

After I run the script,
The output is

one two three four five
i.e. variable $data holds the value “one two three four five”.

Questions

  1. What is the datatype of the variable $data.
  2. What function can I use to get the above output into a [SIZE=2]PHP array of size 5[/SIZE].

Looking forward to your reply,thank you.:sure: