Category: PHP

PHP

PHP error control operator @

PHP error control operator @

PHP error control operator is @. When this operator is prepended to any PHP expression then any error messages that might be generated by that expression will be ignored. Sample (without @ operator) Output...

Debugging prepared statements in php

Debugging prepared statements in php

Prepared statements in PHP sometimes reports a block error which is hard to debug. So for debugging prepared statements we use MYSQLI_REPORT_ALL in conjunction with MySql drivers to get a full detailed message. For...

Merging arrays in php

Merging arrays in php

array_merge Merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array. Syntax Example Output

Count all the values of an array in php

Count all the values of an array in php

The array_count_values() function counts all the values of an array. It returns an associative array, where the keys are the original array’s values, and the values are the number of occurrences. Example Output

Range number of rows in MySql

Range number of rows in MySql

MySql limit is used to range number of rows in a table to be displayed. When Limit used with two arguments, the first argument specifies the offset of the first row to return, and...