Re: [PHP] Using if(isset()) with $_GET and switch and default

2010-05-22 Thread MuFei
Yes, I got it now. Thanks Daniel Thanks everyone! On Sat, May 22, 2010 at 12:08 AM, Daniel P. Brown wrote: > On Fri, May 21, 2010 at 17:02, MuFei wrote: >> Hi Ashley, >> Your way works also great, But I have some question thought: >> When I only use the first half of the code you suggested: >>

Re: [PHP] Using if(isset()) with $_GET and switch and default

2010-05-21 Thread Daniel P. Brown
On Fri, May 21, 2010 at 17:02, MuFei wrote: > Hi Ashley, > Your way works also great, But I have some question thought: > When I only use the first half of the code you suggested: > $question = (isset($_GET['question'])); > then use the $question in the switch it works as I want it. > If I use the

Re: [PHP] Using if(isset()) with $_GET and switch and default

2010-05-21 Thread MuFei
Hi Ashley, Your way works also great, But I have some question thought: When I only use the first half of the code you suggested: $question = (isset($_GET['question'])); then use the $question in the switch it works as I want it. If I use the whole code( $question = (isset($_GET['question']))?$_GET

Re: [PHP] Using if(isset()) with $_GET and switch and default

2010-05-21 Thread MuFei
Thanks, Adam The first option (setting the GET) works great. I already know about taking the default out of the switch and putting it in an else statement, but I want to work with the default inside the switch. And of course I wanted to do it without turning off E_NOTICE warnings Thanks again for

Re: [PHP] Using if(isset()) with $_GET and switch and default

2010-05-21 Thread Ashley Sheridan
On Fri, 2010-05-21 at 16:18 -0400, Adam Richardson wrote: > On Fri, May 21, 2010 at 3:24 PM, MuFei wrote: > > > Hi, > > I'm still new to PHP and everyday I learn something new. > > Today I was trying to make some script using the switch statement but > > I have some issue that I don't know how t

Re: [PHP] Using if(isset()) with $_GET and switch and default

2010-05-21 Thread Adam Richardson
On Fri, May 21, 2010 at 3:24 PM, MuFei wrote: > Hi, > I'm still new to PHP and everyday I learn something new. > Today I was trying to make some script using the switch statement but > I have some issue that I don't know how to get around it. > It's a simple test script that contain only one file

[PHP] Using if(isset()) with $_GET and switch and default

2010-05-21 Thread MuFei
Hi, I'm still new to PHP and everyday I learn something new. Today I was trying to make some script using the switch statement but I have some issue that I don't know how to get around it. It's a simple test script that contain only one file, it has some questions that I want only one question appe