$sql23 = "SELECT * FROM map1pokemon ORDER BY RAND() LIMIT 1;";
$result23 = mysql_query($sql23) or die(mysql_error());
$battle_get23 = mysql_fetch_array($result23);
$sql2 = "SELECT * FROM pokemon WHERE name='".$battle_get23['pokemon']."'";
$result2 = mysql_query($sql2) or die(mysql_error());
$battle_get2 = mysql_fetch_array($result2);
$filler = "SELECT * FROM pokemon WHERE name='Charmander'";
$filler2 = mysql_query($filler) or die(mysql_error());
$filler3 = mysql_fetch_array($filler2);
$pokemon1 = array_fill(1,10,"".$filler3."");
$pokemon2 = array_fill(1,2,"".$battle_get2."");
$pokemon3 = array_merge($pokemon1, $pokemon2);
shuffle($pokemon3);
$pokemon4 = array_shift($pokemon3);
$pic2= mysql_real_escape_string($pokemon4['pic']);
$pic = strip_tags($pic2);
echo "<center>";
echo '<img src="pokemon/'.$pic.'" border=0><p></p>' ;
The queries at the top grab the information about each pokemon, I then want to use the array_fill and array_merge to make it harder for one of the results to appear the, but right now it doesn't show the result of the pokemon after the mixing of the pokemon, I believe that I'm doing the mixing of the pokemon wrong, but have no idea why?
Does anyone see what I'm doing wrong here?