Hey there, I wonder if someone could help me out. My problem is that i need to return two things from my own function. How do i do that? Thanks in advance, Faifas
Use an array, or use a separator and concatenate the strings, then explode them when needed.
Ahh, thanks, my logic whent somewhere 😐
You can also pass parameters by reference:
function example($arg1, $arg2, &$val1, &$val2, &$val3) { $val1 = "Hello"; $val2 = $arg1 ; $val3 = $arg2; return(TRUE); } if(example("John", "Smith", $one, $two, $three)) { echo "$one, $two $three"; }