// On the fly, alter the number of records // displayed in List mode. // This was not thoroughly tested but probably works OK. $num_recs = array(10,20,30,40,50); if(array_key_exists('limit', $_REQUEST)){ $limit = intval($_REQUEST['limit']); }else{ $limit = 10; } $opts['cgi']['persist'] = array('limit' => $limit); $opts['inc'] = $limit; // uncomment to use links instead of SELECT box /* $buffer = "\n".'
Records per page:
';
foreach($num_recs as $n){
$buffer .= "\n";
if($n == $limit){
$buffer .= $limit.' | ';
}else{
$buffer .= ''.$n.' | ';
}
}
$buffer = substr($buffer, 0, -3)."\n".'
Debug: value of $limit = '.$limit.'
' : ''; echo $buffer;