Code: Select all
$words = explode(" ", $str);
for($i = 0; $i <= count($words); $i++)
{
$temp = rand(0, 1);
if($temp == 0) $word = "j00";
if($temp == 1) $word = "yuo";
$words[$i] = str_replace("you", $word, $words[$i]);
}
$str = implode(" ", $words);But something is wrong in there. When I run open the l33tifier page it takes ages for the page to load, so I think that the for loop is infinite by some reason.
I can't find what's wrong in there. Maybe a foreach loop could solve the problem? I don't know how those work though. Do you know what's wrong?