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 Quote Link to comment https://forums.phpfreaks.com/topic/295126-combine-if-statement-and-check-if-exists/ Share on other sites More sharing options...
Solution cyberRobot Posted March 5, 2015 Solution Share Posted March 5, 2015 Try changing this ($_GET['inApp'] == '1') To this (isset($_GET['inApp']) && $_GET['inApp'] == '1') Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.