Re: array_slice() - sometimes has errors when total records isnot even amount

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

 



Bastien Koert wrote:

> The easiest approach is to do a modulus check on the size of the result and
> figure out if you need a blank cell at the end
> 
> $finish = '';
> if($allrows %2 !=0){ $finish = "<div id='empty'>&nbsp;</div>";  }
> 
> //echo out divs
> 
> echo $finish;

Perhaps even simpler(?): use CSS for the presentation, and don't bother
splitting up the result set.

-- 
Christoph M. Becker


-- 
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