Jump to content

Archived

This topic is now archived and is closed to further replies.

Luth

echo() and flush()

Recommended Posts

I have a PHP script that does various mysql queries, and at the very end, echos a return message to the browser:

echo($ret);
return;

Most of the time, that works fine. But sometimes, for some return messages, it just hangs up and wont echo anything. So I put:

echo($ret);
flush();
return;

And it worked, but now there's an extra "\n\n0\n\n\n" (newline chars, zero, newline chars) thats echo'd out. Whats causing it, and how do I fix this problem?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.