tsilenzio Posted July 11, 2007 Share Posted July 11, 2007 I know this is probably dumb to ask but if any of you are fimilar with C++ / C# / Java you would know that u can do if statments a couple of ways for example: if(condition) { //do something } //OR if(condition) //do something in one line Will the second method work in PHP? :s Quote Link to comment https://forums.phpfreaks.com/topic/59508-if-statments/ Share on other sites More sharing options...
LiamProductions Posted July 11, 2007 Share Posted July 11, 2007 It must be echo under the if statements Quote Link to comment https://forums.phpfreaks.com/topic/59508-if-statments/#findComment-295716 Share on other sites More sharing options...
hcdarkmage Posted July 11, 2007 Share Posted July 11, 2007 Check this out http://www.w3schools.com/php/php_if_else.asp Quote Link to comment https://forums.phpfreaks.com/topic/59508-if-statments/#findComment-295717 Share on other sites More sharing options...
per1os Posted July 11, 2007 Share Posted July 11, 2007 I know this is probably dumb to ask but if any of you are fimilar with C++ / C# / Java you would know that u can do if statments a couple of ways for example: if(condition) { //do something } //OR if(condition) //do something in one line Will the second method work in PHP? :s Yes it will. Quote Link to comment https://forums.phpfreaks.com/topic/59508-if-statments/#findComment-295724 Share on other sites More sharing options...
tsilenzio Posted July 11, 2007 Author Share Posted July 11, 2007 Ok thanx alot u prolly just saved me like 250 unnecessary lines throughout my project Quote Link to comment https://forums.phpfreaks.com/topic/59508-if-statments/#findComment-295725 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.