BRADERY Posted February 17, 2011 Share Posted February 17, 2011 <?php $a = 2; $b = 3; $z = fopen("test.txt", 'a+'); if($a > $b) { echo "A is bigger than B"; } elseif fwrite($z, $b); fclose($z); ?> is there a way to get elseif to write to a file? so if b is bigger than a it writes $b to a file? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted February 17, 2011 Share Posted February 17, 2011 else if (what?) can you just use else? if($a > $b) { echo "A is bigger than B"; } else { fwrite($z, $b); } Quote Link to comment Share on other sites More sharing options...
BRADERY Posted February 17, 2011 Author Share Posted February 17, 2011 ahh shit, Lol.. Thanks. Quote Link to comment 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.