May 25, 200916 yr 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?
September 17, 200916 yr 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'; } ?>
Create an account or sign in to comment