[PHP] javascript cookie dissapears when adding session_start()

2013-03-20 Thread Norah Jones
I've been working on a PHP/Javascript Cookie Notify (Including multiple language support). Now I have one small problem, when session_start() is not at the top, the cookie message works as it should be. Now I am trying to add session_start(); at the top, as this will load the current language f

[PHP] significance of escape character in string in PHP

2013-03-18 Thread Norah Jones
I am having an string which was have few ' (single quote) and few " (double quotes) and was not able to insert into the mysql database. I have replaced them with \' and \" and everything is fine. Though this are fine now but don't understand the working and I could have missed few corner cases a

Re: [PHP] Type of a variable in PHP

2013-03-16 Thread Norah Jones
Try this function get_type($var) { if(is_object($var)) return get_class($var); if(is_null($var)) return 'null'; if(is_string($var)) return 'string'; if(is_array($var)) return 'array'; if(is_int($var)) return 'integer'; if(is_bool($var

[PHP] How can I make PHP CodeSniffer Fixer ignore the namespace declaration?

2013-03-12 Thread Norah Jones
I am using the sublime text 2 plugin for PHP Coding Standards Fixer. It is working fine, except for the fact that it considers the namespace invalid (it is in fact invalid and I'm okay with it). this errors halts the script from correcting the rest of the file. I get the following error: T