Sunday, 5 June 2016

Set the timezone in a script

date_default_timezone_set('Asia/Kolkata'); For a list of timezones:

Monday, 8 December 2014

Monday, 1 December 2014

Monday, 24 November 2014

Check if an array is multi-dimensional

if (count($array) == count($array, COUNT_RECURSIVE)) 
  echo 'array is not multidimensional';
  echo 'array is multidimensional';

Filtering data with PHP (Sanitizing data) and Validation

To filter arrays:

Get url query string parameters using Javascript only

Difference between array merge and array + array