functions returning values

Returning valuesPHP ManualPrevChapter 12. FunctionsNextReturning values Values are returned by using the optional return statement. Any type may be returned, including lists and objects. 1  2 function square ($num) { 3  return $num * $num; 4 } 5 echo square (4); // outputs '16'. 6  You can't return multiple values from a function, but similar results can be obtained by returning a list. 1  2 function small_numbers() { 3  return array (0, 1, 2); 4 } 5 list ($zero, $one, $two) = small_numbers(); 6  PrevHomeNextFunction argumentsUpold_function
Wyszukiwarka

Podobne podstrony:
functions returning values
functions returning values
functions returning values
function return
function return
function array values
function array values
function mcve returnstatus
function ldap get values
function ldap get values len
function array count values
function ccvs return
function hwapi attribute values

więcej podobnych podstron