Is it possible to pass a value to the parameter of a function in PHP? -


there function returns value :

function f($criteria, $extra_return) {    return $criteria['activity_code']; } 

i want set value $extra_return parameter. possible in php ?

yes, use passing reference.

function f($criteria, &$extra_return) {    $extra_return = 1;    return $criteria['activity_code']; } 

Comments

Popular posts from this blog

All overlapping substrings matching a java regex -

c++ - Using OpenSSL in a multi-threaded application -

php - Deleting/Renaming a locked file -