Welcome Guest, Not a member yet? Register   Sign In
isset
#1

[eluser]Iwasignited[/eluser]
Hello everyone,

I want to ask a question about isset() function
I tried ' if(isset($this->session->flashdata('msg'))) ' but it doesnt work, i received:
'Can't use method return value in write context' error
Then I deleted the isset() and it works but I dont know why.
Please give me an explanation about isset, is_null, strlen with CodeIgniter
Thanks
#2

[eluser]WanWizard[/eluser]
[quote author="Iwasignited" date="1267968784"]I tried ' if(isset($this->session->flashdata('msg'))) ' but it doesnt work[/quote]
You can only use isset on a variable, not on a function.

If this case useless as well, because the function always returns a value, so it would always be set. As per the manual, the flashdata() method returns FALSE if the requested flash variable does not exist.
#3

[eluser]Iwasignited[/eluser]
OK i see. Thank you




Theme © iAndrew 2016 - Forum software by © MyBB