Stefan83 Posted March 5, 2015 Share Posted March 5, 2015 Hi I'm getting a undefined index error because I belive I need to check if inApp exists before calling it. This is what I have, how do I rewrite? Do I need if (isset.....? <?php if ( 'yes' == get_field('hide_header_and_footer') || ($_GET['inApp'] == '1') ): // Do stuff endif; ?> Thanks Link to comment https://forums.phpfreaks.com/topic/295126-combine-if-statement-and-check-if-exists/ Share on other sites More sharing options...
cyberRobot Posted March 5, 2015 Share Posted March 5, 2015 Try changing this ($_GET['inApp'] == '1') To this (isset($_GET['inApp']) && $_GET['inApp'] == '1') Link to comment https://forums.phpfreaks.com/topic/295126-combine-if-statement-and-check-if-exists/#findComment-1507655 Share on other sites More sharing options...
Stefan83 Posted March 5, 2015 Author Share Posted March 5, 2015 Perfect! Thanks! Link to comment https://forums.phpfreaks.com/topic/295126-combine-if-statement-and-check-if-exists/#findComment-1507661 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.