how to get value from xml into php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kushaljutta
Forum Commoner
Posts: 50
Joined: Fri Dec 26, 2008 11:05 am

how to get value from xml into php

Post by kushaljutta »

i want to get the data from xml file like following...
pattern 1:
<guestbook>
<entry name="kushal">
<mytext>Hi this is kushal</mytext>
</entry>
<entry name="phnai">
<mytext>Hi this is phnai</mytext>
</entry>
</guestbook>

it is difficult to get data for me but i can get data like following
pattern 2:
<guestbook>
<entry>
<myname>kushal</myname>
<mytext>Hi this is kushal</mytext>
</entry>
<entry>
<myname>phnai</myname>
<mytext>Hi this is phani</mytext>
</entry>
</guestbook>
i want to get pattern1 only please
please anyone help me im in dead condition
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: how to get value from xml into php

Post by papa »

kushaljutta
Forum Commoner
Posts: 50
Joined: Fri Dec 26, 2008 11:05 am

Re: how to get value from xml into php

Post by kushaljutta »

thanks Papa...
Post Reply