hi everybody im trying to cycle through a list of numbers in the database is it possible if(!$_GET['categ_id']) $_GET['categ_id'] = 1; Code (markup): to example: if(!$_GET['categ_id']) $_GET['categ_id'] = 1,2,3; Code (markup): 1 2 and three being the category id's thanx in advance
the numbers are categories in the script i need it to cycle through the categories aka the numbers to make my page look fresh
1) You can't assign a value to a $_GET. 2) $category = isset($_GET['categ_id']) ? $_GET['categ_id'] : rand(1, 3); If $_GET['categ_id'] is being sent to the file you'll use that. Otherwise you'll get a random number from 1 to 3.