Re: [PHP] XML array

2011-07-05 Thread Tamara Temple
On Jul 5, 2011, at 12:48 PM, Stuart Dallas wrote: On Tue, Jul 5, 2011 at 6:43 PM, Tamara Temple wrote: On Jul 5, 2011, at 10:47 AM, Stuart Dallas wrote: $arr[] = array('name' => (string)$book->name, 'author' => (string)$book->author); } Interesting -- is the casting to string type necess

Re: [PHP] XML array

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 6:43 PM, Tamara Temple wrote: > > On Jul 5, 2011, at 10:47 AM, Stuart Dallas wrote: > > >> $arr[] = array('name' => (string)$book->name, 'author' => >> (string)$book->author); >> } >> > > Interesting -- is the casting to string type necessary there? I haven't > done that bef

Re: [PHP] XML array

2011-07-05 Thread Tamara Temple
On Jul 5, 2011, at 10:47 AM, Stuart Dallas wrote: $arr[] = array('name' => (string)$book->name, 'author' => (string)$book->author); } Interesting -- is the casting to string type necessary there? I haven't done that before, and it seems to have worked ok... -- PHP General Mailing List (

Re: [PHP] XML array

2011-07-05 Thread Stuart Dallas
On Tue, Jul 5, 2011 at 4:36 PM, Kanishka wrote: > hi this is my first post on php general mailing list, i want to read a xml > file to retrieve data. i tried by using "DOM" and "simple xml" but i > couldn't. > the xml file looks like this.. > > * > > the the title > 7-6-2011

[PHP] XML array

2011-07-05 Thread Kanishka
hi this is my first post on php general mailing list, i want to read a xml file to retrieve data. i tried by using "DOM" and "simple xml" but i couldn't. the xml file looks like this.. * the the title 7-6-2011 book 1 author 1 book 2 auther 2 * i want to put both "

RE: [PHP] XML Array

2003-07-16 Thread Ralph Guzman
Take a look at patConfiguration http://www.php-tools.de/site.php -Original Message- From: Michael Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 3:59 PM To: [EMAIL PROTECTED] Subject: [PHP] XML Array Hey, I'm looking for a function to take an XML file and turn it i

Re: [PHP] XML Array

2003-07-15 Thread Mike Migurski
>I'm looking for a function to take an XML file and turn it into a PHP >array with the same structure. So if I have: It's not one function, but you could use xml_parse() with appropriately-defined handlers for character data and open/close elements: http://php.net/xml There is also http://php.net

Re: [PHP] XML Array

2003-07-15 Thread Evan Nemerson
I seem to remember seeing something like that on hotscripts.com... On Tuesday 15 July 2003 03:58 pm, Michael Smith wrote: > Hey, > > I'm looking for a function to take an XML file and turn it into a PHP > array with the same structure. So if I have: > > > #00 > image.jpg > > > I

[PHP] XML Array

2003-07-15 Thread Michael Smith
Hey, I'm looking for a function to take an XML file and turn it into a PHP array with the same structure. So if I have: #00 image.jpg It would give me an array: Array ( [template] => Array ( [color] => #00 [background] => image.j

[PHP] XML/Array Class (Possible Bug??)

2001-04-23 Thread [EMAIL PROTECTED]
I decided to take my class and just turn it into some functions. It works perfectly. I did not change any code except for removing the class declaration and getting rid of the $this-> statements. I believe that maybe my problem has to do with the use of xml_set_object() making a reference t

[PHP] XML/Array Class

2001-04-23 Thread [EMAIL PROTECTED]
I've narrowed down my problem... It is building the array as it should. I can print_r the results in the function CData(). However, the results are no longer then at the end of GetArray(). I'm not sure what's causing this problem... Parser = xml_parser_create("ISO-8859-1");