Monthly Archive: July 2017

php 0

How to remove the first character of string in PHP

The substr() function is the good solution: $NewString = substr($OldString, 1); Strings are indexed starting from 0, and substr() functions will start from second parameter to store new value into into variable. So the...

php 0

How to detect duplicate values in PHP array

In PHP one dimensional array to find the duplicate values use array_count_values($Array) For example, given the following array: $Array = array(‘Neha’, ‘Komal’, ‘Nidhi’, ‘Niti’, ‘Komal’, ‘Nidhi’, ‘Gaurav’, ‘Kittu’, ‘Komal’); I would like to print:...