I only want x number of lines of data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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? 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux