Tag: PHP

PHP looping statements – PHP tutorial

PHP

PHP looping statements – PHP tutorial. PHP looping statements used for execute same code multiple time. Looping statements loop on array and execute code between block, on every iteration block code have array element value to process.

  Read More »

File create in memory without disk storage using PHP

File create in memory without disk storage using PHP

File create in memory without disk storage using PHP. Create file in memory using PHP sys_get_temp_dir() funtion, without use of disk storage. File create in memory with example code snippet.

  Read More »

Fatal error: Cannot redeclare class className in: How to fix?

Fatal error: Cannot redeclare class

Fatal error: Cannot redeclare class className in.., Error comes when PHP process have duplicate class name in files and both files or class include/import in process.

  Read More »

What is undefined index Notice in PHP array process and How to avoid it?

PHP

Undefined index Notice in PHP array processing. When we try to access key in PHP array which not exists in array, PHP gives Undefined index Notice.

  Read More »

How to compare date in php – compare two dates – date with now time – much more

PHP

Cases: how to compare date in php, php compare datetime, php compare date with current date, php compare date with current date, php compare date with current date, how to compare two dates in php mysql, php mysql…

  Read More »

Are you smart enough to detect is PHP execution from cli command line cron job?

PHP

Detect cli execution in PHP. If you want to find PHP script request source, is it from cli(command line) cron job or from browser? php_sapi_name is best function for you.

  Read More »

PDO IN clause bindparam for where condition mysql

PDO IN clause bindparam for where condition mysql

PDO IN clause bindparam not available, with minor trick we able to prepare mysql IN query bindparam. Using simple loop we can bindparam for PDO IN query.

  Read More »

Array to query string php – Query string to array php

PHP

Content Array to query string php Query string to array php PHP two userful function for convert Array to query string php and Query string to array php with example.

  Read More »

PHP validate all element of array by type (Integer-String-Boolean-Digit..) By master condition

PHP validate all element of array by type

PHP validate all element of array contains only integer-String-Boolean-Digit-Float or any specific type value by master condition. Single condition for check all element of array contains only integer, check all element of array contains only string, check all…

  Read More »

null coalescing operator php – Usage – Example

PHP

All about null coalescing operator php. Post includes null coalescing operator usage, examples, best practices for null coalescing operator.

  Read More »