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

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -