Getting error at conditional statement.

Hi experts,

I am doing an exercise which has the following requirements.

Charlie will bite your finger exactly 50% of the time. First, write a function isBitten() that returns TRUE with 50% probability, and FALSE otherwise
To generate a webpage that displays "Charlie bit your finger!" or "Charlie did not bite your finger!" using the isBitten() function.

I have written the below and geeting error in line 11 of the below code.

<!DOCTYPE html>
<html>
<body>

<?php

function isbitten ()
{
	$list{10}=rand(0,0.5);
	for ( $i=0; $i<100; $i )
if ( $list[$i] == o.5 )
return True ;
else
return False ;
}

$r= function isbitten();
 
 if( $r == "True")
 {
	
Print "Charlie bit your finger!";

else
	
Print "Charlie did not bit your finger!"

 }
 
?>


</body>
</html>

Request your expert opinion to help figure out the solution.

Best Regards,
ND

A number of fundamental things appear to be incorrect.

for ( $i=0; $i<100; $i )  <- you don't increment the counter, i.e. $i++
if ( $list[$i] == o.5 )      <- Sould be 0.5, not the letter `o'
$r= function isbitten();  <- should be $r = isbitten()

You should refer to the documentation since these are syntax errors.