Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

pass address of array in php

function foo(&$array)
{
    $array[3]=$array[0]+$array[1]+$array[2];
    return $array;
}

$waffles[0]=1;
$waffles[1]=2;
$waffles[2]=3;
foo($waffles);

echo $waffles[3];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pass #address #array #php
ADD COMMENT
Topic
Name
6+1 =