0
It's not possible return an array?
2 Answers
0
I believe that it's possible... haven't tried it, but the tip was a little sparse on the explanation.
0
It is possible and tried that many times.
function returnArray() {
return array (1, 2, "Nox");
}
now let's access the return array then print Nox:
$data = returnArray();
echo "Welcome ". $data[2]; // it will print Welcome Nox
Note: you can return associated array as well