3063 Posts in 864 Topics by 646 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1004 Views |
-
Problem using simplexml in controller php

25 January 2010 at 11:38am
I want to use simplexml in my controller php, but I get an error (Node no longer exists).
I suspect ->children() is calling the silverstripe function rather than the simplexml children() function.
Is there any way around this?
class TypeTester_Controller extends Page_Controller {
function MyFunction() {
$xml = simplexml_load_file('myXML.xml');
foreach($xml->library->children() as $child) {
...
}
}
}Thanks
| 1004 Views | ||
|
Page:
1
|
Go to Top |

