Hi you smarts!
I need to extract the info from different row from an array created by :
$autores = mysql_query($query_autores, $conetion) or die(mysql_error());
$row_autores = mysql_fetch_assoc($autores);

And then asign the info OF EACH ROW to some different variables.
I'd try this, but it doesnot work on mozila, only in IE.

$var2 = mysql_fetch_assoc($autores);
$var3 = mysql_fetch_assoc($autores);
$var4 = mysql_fetch_assoc($autores);

and then:

echo ($var2['id']);
echo ($var3['id']);
echo ($var4['id']);

( i dont know how to do it using a "while", because i need same field of diferents rows in diferent variables)

Please help.

    You would use an array with a loop:

    $autores = mysql_query($query_autores, $conetion) or die(mysql_error());
    $var = array();
    while ($row_autores = mysql_fetch_assoc($autores))
    {
        $var[] = $row_autores;
    }
    
    // ...
    // Assuming you know that $var has at least three elements...
    echo $var[0]['id'];
    echo $var[1]['id'];
    echo $var[2]['id'];

      Yes It Does Works,
      Thank you very much LASSERLIGTH,
      when you come arround Guadalajara México,
      i will be glad to show you arround.
      ๐Ÿ™‚

        Yes It Does Works,
        Thank you very much LASSERLIGTH,
        when you come arround Guadalajara Mรฉxico,
        i will be glad to show you arround.
        ๐Ÿ™‚

          You're welcome, but I have no plans to visit Mexico at the moment ๐Ÿ™‚

          Oh, and remember to mark this thread as resolved (if it is) using the thread tools.

            Write a Reply...