Posts tagged 'php'
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.
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.
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?
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.
Calculate number of days in a month php
This simple function will return number of days for given month in php
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().
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".