Math - Adding with PHP

Posted by Wayne on Stack Overflow See other posts from Stack Overflow or by Wayne
Published on 2010-05-31T01:22:54Z Indexed on 2010/05/31 1:32 UTC
Read the original article Hit count: 273

Filed under:
|
|

Basically I can't get it right.

I need something like this:

if($p == 1)
{
    $start = 0;
    $limit = 16;
}

The numbers must add on depending on the value of the $p, e.g. if $p is 5 then the values of $start and $limit would be:

if($p == 5)
{
    $start = 64;
    $limit = 80;
}

The math is to add 16, depending on the value of $p.

Thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about math