The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do I do this in php
This is a very basic question and since I know 0 about php, I dont know how to do it
I have 30 different "if" conditions and I dont know how to do them properly. Its for a shopping website. I want to say If the category is Shoes, then print "Shoes" on the screen. If The category is Belts, print Belts. I need it to run fast because my site is busy and I dont want it to slow my site down. This is what I have now, but for 30 different categories: < ?php if (is_category('Shoes')) { echo "Shoes"; } ?> < ?php if (is_category('Belts')) { echo "Belts"; } ?> < ?php if (is_category('Ties')) { echo "Ties"; } ?> < ?php if (is_category('tshirts')) { echo "tshirts"; } ?> < ?php if (is_category('Socks')) { echo "Socks"; } ?> and so on and so on. See the problem? I start and stop 30 different programs right at the top of the page. Anyone know how I can make that all into 1 big program, instead of a lot of little programs? so it runs faster? thanks for any help! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|