[Solved] Using return in foreach not echo with medoo

Store all the data you want to return in a string, and later return the string: public function something() { $result = “”; // Create empty string foreach($array as $val) { $result .= “something”; // Add something to the string in the loop } return $result; // Return the full string } An alternative (since … Read more