I'm working on an adaptation/extention of this PHP script, which parses news headlines from Moreover:
http://www.alexanderdevelopment.net/...code/moreoverxml.php
Basically, I'm trying to put the script itself into a function that references the other functions, so that I can include it and call the function as needed, rather than it having to run everytime it's loaded. (That was a mouthful, but hopefully you get the idea.) For some reason, though, when I put the main "business" into a function, it fails to return anything when called. I've done enough testing to be fairly confident that it is indeed parsing the XML file, it just isn't returning it to the page. I'm guessing this is some kind of namespace issue or something, but I just can't figure it out.
Anyone willing to take a stab at helping me out with this?
I've attached a stripped down version of what I'm currently working with.
Many thanks in advance for any suggestions!
Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
http://www.alexanderdevelopment.net/...code/moreoverxml.php
Basically, I'm trying to put the script itself into a function that references the other functions, so that I can include it and call the function as needed, rather than it having to run everytime it's loaded. (That was a mouthful, but hopefully you get the idea.) For some reason, though, when I put the main "business" into a function, it fails to return anything when called. I've done enough testing to be fairly confident that it is indeed parsing the XML file, it just isn't returning it to the page. I'm guessing this is some kind of namespace issue or something, but I just can't figure it out.
Anyone willing to take a stab at helping me out with this?
I've attached a stripped down version of what I'm currently working with.
Many thanks in advance for any suggestions!
Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund