0 comments / July 07, 2015

Create dynamic variables name in php

We can dynamically create a variable name based on the other variable value! It is a concept called PHP Variable variables. It might be useful at certain cases, lets see how we do it.


0 comments / June 29, 2015

Regex check minimum and maximum length

Using Regular expression( Regex ), We can check whether the given string has minimum no. of characters or whether it is inside specified range etc.


0 comments / June 24, 2015

http_host server_name difference

To get a domain name in php, we use http_host or server_name variables. But what is the difference between http_host and server_name and which one will return more accurate results?


1 comments / February 26, 2015

Remove non printable characters in string - php

We can remove non printable characters in string by using preg_replace function in php, It's quite simple.


0 comments / February 21, 2015

Calculate number of days in a month php

This simple function will return number of days for given month in php


0 comments / November 11, 2014

Remove last character from string trick in php

General way of trimming last character of string in php is using substr function. But there is another way we can do it using rtrim().


0 comments / July 24, 2014

Solved: xampp new security concept issue

When I try to access phpmyadmin after installing xampp in my linux system, I stuck with this error: New XAMPP security concept: Access to the requested object is only available from the local network. This setting can be configured in the file "httpd-xampp.conf".