php - How to return multiple value from one function? -


i create simple web in php , want return multiple variables 1 function. possible or not. , possible how?

you can return array

function dosth(){     $a = 2;     $b = 5     $c = 9;    return array($a,$b,$c); } 

and use list() method single values:

list($a, $b, $c) = dosth(); echo $a; echo $b; echo $c; 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -