'.$row["image_id"].' - '.$row["image_name"].''; } // get total, and echo out paging links $total = mysql_result(mysql_query("SELECT count(*) FROM 4images_images"),0); $next = ($cur+$max < $total) ? 'next '.$max.' ' : 'next '.$max.' '; $prev = ($cur-$max >= 0) ? ' previous '.$max.' ' : ' previous '.$max.' '; echo '
'.$prev.' - '.$next.' ('.$total.' total)
'; ?>