$pointer[$key_val] = ""; // Start a new node$pointer = & $pointer[$key_val]; // Move the pointer on to the new node} else {$pointer = & $pointer[$key_val]; // Already exists, move the pointer on to the new node}

} // for $i

// At this point, $pointer should be at the furthest point on the tree of keys // Now we can go through all the columns and place their values on the tree // For ease of use, include the index keys and their values at this point too