# Question regarding PHP script

**URL:** <https://forum.kirupa.com/t/question-regarding-php-script/251174>\
**Category:** random\
**Created:** [February 5, 2008, 11:29pm UTC](https://forum.kirupa.com/t/question-regarding-php-script/251174 "2008-02-05T23:29:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![soban](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@soban](https://forum.kirupa.com/u/soban)\
**Post date:** [February 5, 2008, 11:29pm UTC](https://forum.kirupa.com/t/question-regarding-php-script/251174/1 "2008-02-05T23:29:02Z")

</div>

Hello,

I have used the PHP script ([http://www.kirupa.com/web/xml\_php\_parse\_beginner.htm](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:
