I have a series of horizontal lines and vertical lines, and I need to find all the cross points of these lines. I do this with
$x_lines[$x][]=array($y1,$y2); // a