Jump to content

randum number between 1 and 160


jakebur01

Recommended Posts

I am trying to get a number between 1 and 160 for my calendar to select events from a table that has 160 rows.

I cannot use rand() because I need the events to be the same for everyone that views the calendar.

 

The code below works ok, only it groups the events together alphabetically. Like all of the c's and d's will be in the same month although it is grabbing from every other row.

$calcmonth=date("m");
$numberto=$calcmonth+$calcmonth+$day_num*2;

 

Link to comment
https://forums.phpfreaks.com/topic/147194-randum-number-between-1-and-160/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.