I found this code online and i want to understand it, i have read the php documentation but i have found out that the php programming community offers better explanations
PHP Code:
function mysql_safe_query($query) {
$args = array_slice(func_get_args(),1);
$args = array_map('mysql_safe_string',$args);
return mysql_query(vsprintf($query,$args));
}
I figure the function isn't a builtin php function.array_slice returns a sequence of elements from the array func_get_args with an offset of 1.
I looked up func_get_args and it's supposed to return a copy of the given element(array? object)?? and I guess vsprintf returns a formatted string, removing the string quotations '' ??