This is some example PHP code code;

```
<?php
function myFunc() {
    echo "blue";
}

for ($i=1;$i<=5;$i++) {
    echo "I like the colour " . myFunc() . "</br>";
}
?>

```

This generates the output;

```
blueI like the colour 
blueI like the colour 
blueI like the colour 
blueI like the colour 
blueI like the colour

```

In my actual project, myFunc is making an MySQL call (if it makes any difference mentioning that). How can I make my loop wait for that function to return before carrying on otherwise the output is out of order like above.