Passing arrays by reference
<?
function load_member_data($ID, &$member) {
$member["Name"] = "Bob";
return true;
}
$ID = 1;
$result = load_member_data($ID, $member);
if ($result) {
print "Member {$member["Name"]} loaded successfully.\n";
} else {
print "Failed to load member #$ID.\n";
}
?>
Related examples in the same category