Thread: PHP Switch/Case
View Single Post
Old 09-03-2006, 05:04 PM   · #2
Noobie
DNOA Member
 
Noobie's Avatar
 
Name: Shoei
Location: Montreal, Quebec, Canada
Trader Rating: (0)
Join Date: Feb 2006
Posts: 324
NP$: 65.00 (Donate)
Noobie is on a distinguished road
Quote:
Ever wonder how people get things like ?x=news&id=496? Well, here is one way to do it.


This is your code
<?php
switch(id){
case 'news':
//what you want for news in here.
break;
case 'about':
//what you want on the about page.
break;
default:
//what text you want to display for default.
break;
}
?>
I'm gonna bet it hits default everytime.


Please register or log-in into NamePros to hide ads
__________________
Goldkey.com is a scam
What's your BMI? | Timestamp Generator
Noobie is offline   Reply With Quote
Site Sponsors
Hunting Moon Buy Flash Arcade Game Script http://www.mobisitetrader.com/
Advertise your business at NamePros
All times are GMT -7. The time now is 03:50 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.