josephicon Posted February 16, 2007 Share Posted February 16, 2007 Hi I have somthing like this up after copying similar from a tutorial what type of IF is it what is its name? print "" .(($get_fields->fieldname == "id" ) ? "<input name=$get_fields->fieldname value=$nextid $get_fields->fieldview" :"other box"). How can I add more conditions such as $get_fields->fieldname == "ids" with yet other output before going to the else part of the statment? Many Thanks Link to comment https://forums.phpfreaks.com/topic/38756-what-type-of-if-statement-is-this-if-it-is-a-if-at-all/ Share on other sites More sharing options...
zq29 Posted February 16, 2007 Share Posted February 16, 2007 It's called a ternary statement. Link to comment https://forums.phpfreaks.com/topic/38756-what-type-of-if-statement-is-this-if-it-is-a-if-at-all/#findComment-186218 Share on other sites More sharing options...
josephicon Posted February 16, 2007 Author Share Posted February 16, 2007 I am using this within a print after a WHILE statement when creating a form based on a mysql table. Could I do the same with IF and ELSEIF Link to comment https://forums.phpfreaks.com/topic/38756-what-type-of-if-statement-is-this-if-it-is-a-if-at-all/#findComment-186221 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.