I need to return multiple values from a function, therefore I have added them to an array and returned the array.
function data(){ $a = "abc&qu
From PHP 5.4 you can take advantage of array dereferencing and do something like this:
function data() { $retr_arr["a"] = "abc"; $retr_arr["b"] = "def"; $retr_arr["c"] = "ghi"; return $retr_arr; } $a = data()["a"]; //$a = "abc" $b = data()["b"]; //$b = "def" $c = data()["c"]; //$c = "ghi" ?>