I have such a code:

<?php
$dif=$game['Game']['difficulty'];
echo "Number of experiments left to try:".$dif."</br>";



echo $randword."</br>";

$randArray=str_split($randword,1);
print_r ($randArray);
echo "</br>";

$codeArray=array("*", "*", "*", "*", "*");
$code=implode("",$codeArray);
//echo $code;

for ($i =97; $i<=122; $i++) 
{ 
echo "<a href=?var=".chr($i)."&code=".$code.">".chr($i) ."</a>". "&nbsp";
}
 $params=$this->params['url'];
echo "</br>";
//print_r ($params);
 $letter=$params['var'];
echo $letter."</br>";
 $code=$params['code'];
echo $code."</br>";
 if(in_array($letter, $randArray))
{
$position=array_search($letter, $randArray);
//echo $position;
$code[$position]=$letter;
 echo $code;
 }
else 
{
echo "no match";
} 
?>

But when if statement is true. the code value in url isn't changed.
Can someone help me?

Thanks :)

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to