Jump to content

how do i order numbers on result?


Monkuar

Recommended Posts

look:

 

$result = mysql_query("SELECT donorlevel, id, name, desktop FROM ibf_members  ORDER BY donorlevel DESC LIMIT 5;")

 

 

and my html code is:

 

 

$id = "<a href='forums/index.php?showuser={$row['id']}'>{$row['name']}$lol</a>";

 

 

ok so i need a php code that does 1) 2) 3) 4) for each LIMIT XX I DO, and put's it next to the $id,

 

thx

 

Link to comment
https://forums.phpfreaks.com/topic/148718-how-do-i-order-numbers-on-result/
Share on other sites

Show your new knowledge as a proper example, nice to here it mate!

 

$counter = $counter + 1; << increment by 1 it means.

 

++$counter; <<< same result i guess.

 

look at this to brain kill ya.

 

<?php

$redarrow=1;

$redarrow=$redarrow+1;

echo $redarrow;

?>

 

<?php

$redarrow=1;

++$redarrow;

echo $redarrow;

?>

look at this it crazy but it works in the correct way.

<?php

$array=array("a","b","c","d");

$num=0;

echo $array[$num];

echo $array[++$num];

echo $array[++$num];

echo $array[++$num];

?>

 

result.

abcd

 

understandable way.

<?php

$array=array("a","b","c","d");

echo $array[0];

echo $array[+1];

echo $array[+2];

echo $array[+3];

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.