brainonastick Posted May 25, 2009 Posted May 25, 2009 Hi there, I want to use an if statment to determine which of 2 html links is displayed. Heres my code so far: <?php if ($UN_CheckData['Internal_or_External'][0] == 'External') { echo '.'">Show Me All CCWT Courses I am Presenting this Year'. ; } if ($UN_CheckData['Internal_or_External'][0] == 'Internal') { echo '.'">Show Me All CCWT Courses I am Presenting this Year'. ; } ?> What am I doing wrong?
beverly Posted September 17, 2009 Posted September 17, 2009 It's hard to tell, but it looks like you have a "." outside the single quote for the echo statement. You also appear to have nested <?php... Also, I'd make the second "if" into "else if", that way there it clearly only ONE choice of the two. Invest in a color-coding editor and you'll see some of the mistakes! <?php if ($UN_CheckData['Internal_or_External'][0] == 'External') { echo 'Show Me All CCWT Courses I am Presenting this Year'; } else if ($UN_CheckData['Internal_or_External'][0] == 'Internal') { echo 'Show Me All CCWT Courses I am Presenting this Year'; } ?>
Recommended Posts
This topic is 5615 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now