Page 1 of 1

calling functions

Posted: Fri Aug 02, 2002 4:55 am
by CodeEye
this may seem like a funny question but how how i call a function when i store the name if a varible e.g.

function getfunc(id)
id() ;
}

havent tested this but i don't think it would work ?

Posted: Fri Aug 02, 2002 5:32 am
by twigletmac
That wouldn't work - what exactly are you trying to do?

Mac

Posted: Fri Aug 02, 2002 5:50 am
by CodeEye
if is for my xml parser i know what the names are going to be called so i have built a function for each rather than having a big switch statement i hope to just call the function depending on the name like the
opening and closing of the
xml_set_element_handler($xml_parser, "startElement", "endElement");

function

Posted: Fri Aug 02, 2002 5:59 am
by twigletmac
I think that this is what you are looking for:
http://www.php.net/manual/en/functions. ... ctions.php

Mac