Can anyone show me an example of how to shuffle an array?
How to shuffle an array?
Collapse
X
-
Thankyou, u were right i didnt need that part so i deleted it and made my script less confusing.
[code=php]
$Myarray("o" => "y",
"o" => "z");
foreach ($Myarray as $letter => $otherLetter) {
$wordFromForm1 = str_replace($le tter,$otherLett er,$wordFromFor m);
echo $wordFromForm1 . "<br />";
}
[/code]
if i type in the letter "o" into my form i get....
0
z
but i would like.....
y
z
it always only prints the last letter but i want both, i cant understand whats happening here, any feedback would really help me out in the future please help.Comment
Comment