PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$All = array();
$ID_list = array("1", "2", "3");
foreach($ID_list as $ID) {
echo $ID . "<BR>";
subFunc($ID);
}
print_r($ALL);
function subFunc($ID) {
global $All;
$All[] = $ID;
}
?>
Last edited by Benjamin on Mon Aug 27, 2012 10:15 pm, edited 1 time in total.
Reason:Added [syntax=php||htm||css||javascript||sql||etc] - Please use [syntax] tags when posting code in the forums! Thanks.