jeds Posted April 30, 2006 Share Posted April 30, 2006 I think its a script, nomenclature overwhelms me:[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<?phpif ($_SERVER['SERVER_ADDR'] = 216.40.250.54) { ?><strong>BLUE</strong><?php } else { ?><strong>YELLOW</strong><?php }?>[/quote]I just get the Parse errorThx Quote Link to comment https://forums.phpfreaks.com/topic/8737-parse-error/ Share on other sites More sharing options...
LiLaaron Posted April 30, 2006 Share Posted April 30, 2006 Hi,[code]<?phpif ($_SERVER['SERVER_ADDR'] == "216.40.250.54") { echo "<strong>Not Found</strong>";} else { echo "<strong>We Got It!</strong>";}?>[/code]That should do itAaron Quote Link to comment https://forums.phpfreaks.com/topic/8737-parse-error/#findComment-32097 Share on other sites More sharing options...
jeds Posted April 30, 2006 Author Share Posted April 30, 2006 Thanks, Aaron, it works great. So now I can use it to define variables:[code]<?phpif ($_SERVER['SERVER_ADDR'] == "216.40.250.54") {$var = 'Bob';$var_2 = 'Sam';} else {$var = 'Ralph';$var_2 = 'Joe';}?><?phpecho "$var, $var_2";?>[/code]Works too :) Quote Link to comment https://forums.phpfreaks.com/topic/8737-parse-error/#findComment-32185 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.