Well, I wasn't totally sure in what circumstance you wanted me to run that piece of code, so I did the following:
- I ran simply that piece of code between <?php ?> and nothing else, and yes, this call to php works.
- I put the function call at the beginning of my script when I had enough code...