Tengo las siguiente variables(solo un ejemplo):
Código PHP:
$numero_consulta= mysql_query('SELECT MAX(id) FROM tabla');
$numero_row= mysql_fetch_array($numero_consulta);
$numero= $numero_row['MAX(id)'];
Por ej si ($numero = 4), mostrar 1 , 2 , 3 , 4. Si ($numero= 7) mostrar 1, 2, 3, 4, 5, 6, 7. Nosé si me explico bien.
Cya