function getChildren($ParentID, &$InndentLevel, $i, $MyArray)
{
$InndentLevel++;
for ($j=0; $j < $i; $j++){
if ($MyArray[$j][3] == $ParentID){
// Bestemmer hvor mye hvert mellomrom som skal skille hver level
for ($k=1; $InndentLevel > $k; $k++){
Print " ";
}
// Skriver ut navn
Print $MyArray[$j][1]." ".$MyArray[$j][2]."\t\t$InndentLevel<br>";
//$test = array();
//$test2 = array();
//array_push ($test, $MyArray[$j][1]);
//array_push ($test2, $InndentLevel);
// Kaller seg selv
getChildren($MyArray[$j][2],$InndentLevel, $i, $MyArray);
}
}
$InndentLevel--;
}
Don't know if this code is readable here, but I wondered if I make a array inside of a function, how do I then "return" it.. because.. I do a print inside the function, and I want excactly what I print into a <select> box..hehe.. is it possible..?