One thing I've noticed that is very difficult with Phalanxes is after you've engaged your enemy it's very easy for your line to dissolve very quickly, as different Phalanx units turn and move out of their line as the enemy units run about, change positions and flee.

I've found a number of times, especialy when fighting the Romans as the Greeks, that after I meet them with my Phalanxes, or just before their Cohorts will run all around, making it difficult to create a solid line. It's very useful in times like these to make good use of the Phalanx formation button so you can move your troops around quickly and rediploy them. Don't be afraid to take them out of formation, just do it carefully. Also make good use of peltasts, and heavy petlasts. If and when your line breaks appart, and the battle turns into chaotic group fighting, they can move from battle to battle, both flanking and guarding flanks.

The most important thing is, if you can to keep unity, you will gain the day. :)