I have 3 arrays:
and I want $arr1 to show up twice more than $arr2 and 3. I wrote this:
but all it does is display the TEXT "$arr3". It never displays the arrays (which are all text strings e.g. one is a quote randomiser).Code:$shuffle = '$arr3#$arr2#$arr1#$arr1'; $shuffle = explode('#', $shuffle); shuffle($shuffle); $shuffle = implode('#', $shuffle); $shuffle2 = substr($shuffle, 0, strpos($shuffle, '#')).''; echo $shuffle2;
$arr1, 2 and 3 all show up their resulting text when echoed individually, so all their programming works fine. But I only want to display one of those arrays at a time and $arr1 more than the other two.