I was just wondering what the best (if there is one) way to return values is, when using functions.
When using a function that has to return one or more values, I usually do something like this:
$ret["c"] = "error message or TRUE";
$ret["r"] = some return values;
But this way it is not very practical checking the outcome of a function, and when getting the results i sometimes get stuff like $result["r"]["array1"]["array2"].