Jump to content

babskool

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

babskool's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Now What if i want to display the result inside something like this: $message.="Country $country_name"; Please let me know.. Thanks,
  2. Hey guys, Below is my code _________________________________________________________________________ function country() { global $step3_country1; if($step3_country1 == "1"){ echo"Brazil"; }elseif($step3_country1 == "2"){ echo"China"; }elseif($step3_country1 == "3"){ echo"Costa Rica"; }else{ echo"No Country Selected"; } } $country_name = country(); ___________________________________________________________________________________ Now What if i want to display the result inside something like this: $message.="Country $country_name"; Please let me know.. Thanks, Shawn  :)
  3. Hey guys i have one more question: What if i want to display the result inside something like this: $message.="Country $country_name"; Please let me know.. Thanks, Shawn :)
  4. Thanks Guys.. All of it worked.... :)
  5. I'm trying to use a simple function command and trying to display the country name according to the number chosen but this code some how doesn't work.... It Only Shows the last option: "No Country Selected" Although i tried with all the numbers.... Please let me know whats missing on the code... <?php function country() { if($step3_country1 == "1"){ echo"Brazil"; }elseif($step3_country1 == "2"){ echo"China"; }elseif($step3_country1 == "3"){ echo"Costa Rica"; }elseif($step3_country1 == "4"){ echo"India"; }elseif($step3_country1 == "5"){ echo"Ghana"; }elseif($step3_country1 == "6"){ echo"Kenya"; }elseif($step3_country1 == "7"){ echo"Nepal"; }elseif($step3_country1 == "8"){ echo"Peru"; }elseif($step3_country1 == "9"){ echo"South Africa"; }elseif($step3_country1 == "10"){ echo"Tanzania"; }elseif($step3_country1 == "11"){ echo"Thailand"; }elseif($step3_country1 == "12"){ echo"Sri Lanka"; }else{ echo"No Country Selected"; } } $country_name = country(); echo $country_name; ?> Thanks, Shawn :)
×
×
  • 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.