We're a place where coders share, stay up-to-date and grow their careers.
Here is the simple solution with PHP:
function countsheep($num){ $sheepString = ""; for ($index=1; $index<=$num; $index++) { $sheepString .= (string)$index . " sheep..."; } return $sheepString; }
Here is the simple solution with PHP: