slice pages into php