Re: PHP coding question

From: Date: Sat, 07 Apr 2001 04:41:50 +0000
Subject: Re: PHP coding question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47539@lists.php.net to get a copy of this message
Try this : if($page_num % 8 == 0) { do this } or to make it a bit more obvious: if(($page_num % 8) == 0) { do this } This way the "if" statement is executed only when the remainder of $page_num divided by 8 is equal to zero, i.e. $page_num is a multiple of 8. > > if ($page_num is a multiple of 8) { > > do this > > } > > If you want to know what I'm trying to do... > I have a left frame showing a recordset of 8 records at a time. the frame > on the right shows the detail (more info) of one record at a time. if the > user clicks "next record" in the right frame and the record goes beyond the > 8 on the left, I want to be able to refresh the left frame to show the next > 8 records. > > Thanks! > > Rory > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#47539) next »