Posts Tagged ‘php’

How to perform case insensitive array search in php?

Searching is a usual and regular task in programming. Letters case sensitivity is a problematic in searching. Hence, both search string and array string should be converted into same case before searching. Otherwise searching would return the empty result. Here is how to do it: As shown above, search string is converted into lowercase and all the items of an array are converted to ... Full story

How to show all errors in php?

Without editing php.ini it is possible to display almost all errors in php by adding following 3 lines of codes on the top of the php page: Hope it helped you. If it helped please do not forget to comment below. Thanks. Full story

How to solve PHP Warning: mysqli_connect(): (HY000/2002): Connection refused problem?

The default port on MAMP for mysql is 8889, but the port that php expects to use for mysql is 3306. So you need to change it. Open MAMP, go to Preferences and Ports and change the MAMP mysql port to 3306, then click ok. Then mysql server will be restarted by MAMP if not then restart it manually. Now the connection should be successful ... Full story

How do get PHP Errors to display?

To get PHP errors to display without modifying php.ini add the following codes to the top of the php file: However, it won't show parse errors. To show parse errors modify your php.ini with this line: Full story
Copyright © 2017 Programmer to Programmer- A website for web programming and mobile application programming tutorials.
Wordpress themes