Page 1 of 1

calling dynamic function

Posted: Sun Jul 04, 2004 10:39 am
by pelegk2
day i have 2 function :
func1()
func2()

is there a way that i can call a function dynamiclly something
like :

Code: Select all

$i=2;
eval("func".$i);

Posted: Sun Jul 04, 2004 10:41 am
by feyd

Code: Select all

<?php

$func = 'func1';
$func();

?>

Posted: Sun Jul 04, 2004 10:47 am
by pelegk2
nice trick
where can i read documentation about it?