They both seem to do the same thing: return the output buffer content to you and delete it aftewards.
Which one should I use?
ob_get_clean will just return the contents of the buffer and assign it to whatever variable you want it to, but it will not output anything.
ob_get_clean
ob_get_flush on the other hand, does everything that ob_get_clean does, but it also outputs the content.
ob_get_flush