$data = mysql_query(" SELECT * FROM user_pokemon_db WHERE user_id = '".$id."' ");
while($rows = mysql_fetch_array($data))
{
$pkmn_id = $rows['pkmn_id'];
$path = mysql_query(" SELECT path FROM pokemons WHERE pk_id = '".$pkmn_id."' ");
$poke = mysql_result($path, 0, "path");
echo $poke;
echo "<br />";
$level = $rows['level'];
echo $level;
echo "<br />";
$exp = $rows['exp'];
echo $exp;
This is my PHP code, its showing an error:
Array to string conversion in C:\wamp\www\slots.php on line 18
Line 18 is this:while($rows = mysql_fetch_array($data))
I haven't used any array?? but this used to work! but suddenly this error started coming??
$idconsist?$idthat is in you query? Is it possible that it is an array and not a string/integer.mysql_functions and use PDO. Also don't interpolate variables into SQL queries.