try to print_r($this->params); and you will see that you need to use other, not "url" key :) -- Lep pozdrav, Tilen Majerle http://majerle.eu
2012/9/8 girl <[email protected]> > 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>". " "; > } > $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. > > > -- 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.
