in reply to Rotating a text File

Do you perhaps mean Transpose?

If your 2D array is stored as $array[$i][$j], just write it out as $array[$j][$i]. For more help, see the tutorial on 2D arrays (technically, Arrays of Arrays).

I didn't quite get the details regarding your titles but this should get you pretty close ... as long as I understood the question correctly.