How could i do, something like:
if ($cat=="gallerry") {function} if ($cat=="links") {other function}
etc. At the moment, i only can really do it with "Else" which is toooooo much coding...
First of all you are lazy 😉
Use a case statement:
switch($cat){ case"gallery": // do something break;
case "links" //something else break; // and so on..... }
Course im lazy! otherwise i wouldnt be shoving so much php into my site.
Works fine, and is what i want! Thanks!
Erm. Ive done more than 2 in that, and its decided to do all the functions... if you select the 2nd or downwards (and 1st isnt included) but for the 1st its fine...
Check your syntax - case "whatever": thing to do ; break;
there can also be default: do something;