note 109163 deleted from function.session-start by salathe
| From: | salathe@php.net | Date: | Mon, 25 Jun 2012 09:04:09 +0000 |
| Subject: | note 109163 deleted from function.session-start by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-188785@lists.php.net to get a copy of this message | ||
Note Submitter: Pierre
----
@will dot joi at hotmail dot com
In your example, there is no difference between simple and double quote :
if($_SESSION['nome'] == "") is the same as ($_SESSION['nome'] ==
'')
You could use if(strlen($_SESSION['nome']))
But if you want to check session you must prefer : if(isset($_SESSION['nome'])) or the
better way if(!empty($_SESSION['nome']))
The first test can be empty, not the second one.