I want to get all the output out of the buffer. When I use flush() my program crashes. Is there something that is similar to fflush(stdout) in C?
check out the output buffering functions
ob_start() ob_flush() etc...