This way useful for create mixed arguments function.
function foo()
{
$args = func_get_args();
print_r($args);
}
foo(1, 1256, 6, 17); //mixed ...
-------------------Out----------------------
Array
(
[0] => 1
[1] => 1256
[2] => 6
[3] => 17
)Tags
No tag here. Recommended pages
Parse a string into separate words...Parse a string into separate words (array output).
function parser($str, $char = ' ')
{
$str = trim($str);
$str = $str . $char;
$len = strlen($str);
$words = array();
$w = '...
SQL escape string function...Escapes special characters in a string for use in an SQL statement. howewer it check get_magic_quotes_gpc function is enable or no. if true , it strips string from slashes and escaped string from spec...
Best way to get user ip address in php...Here is a function to getting ip using filter of local and lan ip's.
function get_ip()
{
$list = array( 'REMOTE_ADDR', 'CLIENT_IP', 'HTTP_CLIENT_IP',
'HTTP_PROXY_CONNECTION',...
URL Checker...This function check if an url is valid or not.
function is_valid_url($url)
{
return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);
}...