Jump to content
Fórum Script Brasil
  • 0

Dividir consulta em 3 colunas



Boa noite pessoal, preciso dividir uma consulta em 3 colunas, segue o que eu tentei fazer. Obrigado a todos.

function selectavatar(){
$database = new Database();

$sqlsavatar = mysql_query("SELECT * FROM avatars");

$rowavatar = @mysql_num_rows($sqlsavatar);

if (!$rowavatar) {
echo "Avatar não encontrado";
if ($rowavatar > 0) {
while ([email protected]_fetch_array($sqlsavatar)){
$id = $txtavatar['id'];
$avatar = $txtavatar['av'];
$sexo = $txtavatar['sexo'];
$html = "
<div style='margin:auto;'>
<div><img src='{$avatar}' width='180' height='178'></div>

if( $i%3 == 0 ) {
echo $html;


Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...