|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-07-04 04:53 UTC] drago at 0x00 dot org
$args=array("foo", "bar", "geek");
call_function("f", $args);
function f($f1, $f2, $f3) {
echo "$f1 $f2 $f3";
}
Output: foo bar geek
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 10:00:02 2025 UTC |
What prevents you from doing: $func(array("foo", "bar", "geek")) and opening that array in function?I am looking to use this with existing PHP functions, not user space ones. Specifically I would like to use this with ibase_execute() for the bindings. I am writting a little database wrapper and I need to be able to do... $res=DB("select * from Foo where bar=?", $reallygeeky); and that arg list is of variable length so I want to be able to do my custom stuff in DB() then toss the args in an array and call ibase_execute. I have it working as it is, but it is ugly. Right now I am building up eval() code and having it return the resource into a global var. Its ugly :) Would be much easier if I could just build up an array and call call_function("ibase_execute", $theargs);