Sunday, 5 June 2016

Set the timezone in a script

date_default_timezone_set('Asia/Kolkata'); For a list of timezones: http://php.net/manual/en/timezones.asia.php

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';
}
else
{
  echo 'array is multidimensional';
}


http://stackoverflow.com/questions/145337/checking-if-array-is-multidimensional-or-not

Filtering data with PHP (Sanitizing data) and Validation

http://www.phpro.org/tutorials/Filtering-Data-with-PHP.html

http://code.tutsplus.com/tutorials/sanitize-and-validate-data-with-php-filters--net-259

http://www.sitepoint.com/input-validation-using-filter-functions/

To filter arrays:

http://stackoverflow.com/questions/19637210/post-variable-array-and-filter-input




http://php.net/manual/en/function.filter-input.php

http://php.net/manual/en/filter.constants.php

http://php.net/manual/en/function.filter-input-array.php

http://php.net/manual/en/filter.filters.php

http://php.net/manual/en/filter.filters.validate.php

Get url query string parameters using Javascript only

http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript

Difference between array merge and array + array

http://stackoverflow.com/questions/5394157/whats-the-difference-between-array-merge-and-array-array