I\'m trying to create a function which checks whether the number is prime or not. BUT I want this function to echo to the user \'prime\' or \'NOT prime\' - and that\'s where my
Put else part otherwise it will always return Prime
return Prime
for ($i = 2; $i < $num; $i++) { if ($num % $i == 0) { echo 'NOT prime'; break; } echo 'Prime'; }