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 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 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 :) Link to comment https://forums.phpfreaks.com/topic/8737-parse-error/#findComment-32185 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.