PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
imlode will combine the array values into a string and send it as a single argument. foo1(implode('', $a)); will end up as foo1("string-astring-bstring-c");
what I need is it to send it as foo1("string-a", "string-b", "string-c");
<?php
function foo($a, $p1 = "", $p2 = "") # This cannot be changed to variable number of params
{
foo1($a);
}
function foo1() # variable number of params
{
}
?>
function foo1($a) is called with argument $a, but in function definition there is no argument. Is this possible in php?