Is it possible to use php's func_get_args() to catch 'post(ed)' data from an Ajax function call? (Currently using json to post data).
Hypothetical Ajax call posting data:
.
url: '.../.../...?action=function'
data: { someString: someString }
.
.
php:
function() {
$arg_list = func_get_args();
foreach( $arg_list as ....) {
.
.
}
}
i'm currently using isset( $_POST['someString'] ) but I was wondering if i can achieve the same using func_get_args().
Currently, func_get_args isn't catching anything from the ajax call. The 'post' line is directly below this chunk of code and is verifying that ajax has correctly sent the function the correct data. However, func_get_args isn't actually displaying anything on a var_dump. What am i not doing?
Many Thanks