|
|
 |
Re: FN-FORUM: PHP String to Constant
date posted 3rd August 2006 12:00
Rich wrote:
>
> As it stands I have;
>
> $numberofresults = function_to_hit_page_and_calculate();
> $numberofpages = $numberofresults / 250;
> $count = 0;
> Then I have
>
> while ($numberofpages > $count) {
> // Do something
> $count++;
> }
>
> Can anyone see any potential issues with this? It works at the moment.
>
Can't you do:
$numberofresults = function_to_hit_page_and_calculate();
$count = (int)($numberofresults / 250) + 1;
?
Regards,
Rob...
|
 |
|