Jump to content

if help please


feri_soft

Recommended Posts

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 example
the link to the tut must be cat1.php?view=4
if category=2
the link must be cat2.php?view=70
and 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

[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

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.