feri_soft Posted April 30, 2006 Share Posted April 30, 2006 I have some files(about 20) for each category.I have a script to list the latest files and in the mysql table there is the catid.How to associate every catid with the correct file.If $categoryid = 1 for examplethe link to the tut must be cat1.php?view=4if category=2 the link must be cat2.php?view=70and so on...where $categoryid = $row[categoryid] is it correct?Can you help me writing this script? I need it very much,please! Link to comment https://forums.phpfreaks.com/topic/8747-if-help-please/ Share on other sites More sharing options...
Barand Posted April 30, 2006 Share Posted April 30, 2006 [code]switch ($categoryid) { case 1: $link = 'cat1.php?view=4'; break; case 2: $link = 'cat2.php?view=70'; break; //etc}[/code] Link to comment https://forums.phpfreaks.com/topic/8747-if-help-please/#findComment-32163 Share on other sites More sharing options...
feri_soft Posted April 30, 2006 Author Share Posted April 30, 2006 But the tutorials are listed from a mysql database how to determine which gors for case 1 for case 2 etc?? Link to comment https://forums.phpfreaks.com/topic/8747-if-help-please/#findComment-32215 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.