Welcome Guest, Not a member yet? Register   Sign In
[Thanks All For Advice] Checking if isset is correct?
#9

(This post was last modified: 09-11-2016, 11:22 PM by Wouter60.)

(09-11-2016, 05:08 PM)JayAdra Wrote:
(09-10-2016, 11:50 AM)PaulD Wrote:
PHP Code:
<?php if (!empty($view['navbar'])) $this->load->view($view['navbar']); ?>

Will that not throw a warning if the key doesn't exist in the array though? Hence the use of isset?
Hence the use of element(). This will not throw an error, but you can decide yourself what value you want if the array key doesn't exist.
Reply


Messages In This Thread
RE: Checking if isset is correct? - by JayAdra - 09-09-2016, 04:39 AM
RE: Checking if isset is correct? - by InsiteFX - 09-09-2016, 04:55 AM
RE: Checking if isset is correct? - by PaulD - 09-10-2016, 11:50 AM
RE: Checking if isset is correct? - by Wouter60 - 09-11-2016, 10:26 AM
RE: [Thanks All For Advice] Checking if isset is correct? - by Wouter60 - 09-11-2016, 11:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB