I only want x number of lines of data
| From: | Ross | Date: | Wed, 09 Aug 2006 14:28:59 +0000 |
| Subject: | I only want x number of lines of data | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-240371@lists.php.net to get a copy of this message | ||
At the mometn I have this
function display_result($module_no) {
if ($module_no != "") {
$module_no =unserialize ($module_no);
foreach ($module_no as $number => $data) {
$count=$count+1;?>
Q.<?=$count; ?>- <span
style="font-weight:bold"><?=$data;?></span><BR />
<?
}
}
which outputs all the data in the array..typically..
Q.1- pass
Q.2- pass
Q.3- pass
Q.4- pass
Q.5- pass
but what if i only want q1-q3 output? any ideas how I can modify the script
to give me x number of outputted answers?