
-----------------------------------
compstudent
Tue Mar 15, 2011 9:20 pm

Basic Prime Function Help
-----------------------------------
Hi,

I am just starting learning PHP and I have tried to make this Prime Number function. I know it is redundant and not efficient. It also has a little HTML form, but whenever I run the function it says you cannot divide by zero in a big error box on the web browser (through easyPHP)

Here is the code

function findPrime($number)
{	
	$no=true;
	$i=2;
	while($i