I have an array that I loop through with for each loop it returns only the first iteration but if I change it to echo it prints all of them to the screen, new to PHP not sure why is it acting this way tried looking for an answer but did not find one. the code below:
function getData($values){ foreach ($values as $key => $value){ return "<p>". $key . " " . $value ."</p></br>"; } } $SubmitedResult->SerialisedForm = getData($data);
return?