You can use the eval() function ...
function sqlDo($ResultID) {
for ($i = 0; $i <= func_num_args()-1; $i++)
args[$i] = "\"".func_get_arg ($i)."\"";
eval("ibase_execute(\$ResultID,".join("," $args).");");
}
$sql = "UPDATE users SET text = ? WHERE id = ?";
$sqlConn = ibase_prepare($conn,$sql);
sqlDo($sqlConn,"Harry","1");
sqlDo($sqlConn,"Fred","2");
Try the above ... I haven't debugged it, so there might be a glitch, but you get the idea.