neex1233 Posted November 12, 2009 Share Posted November 12, 2009 Hi, I want to echo a string in PHP, then erase it from the screen, but I can't find any way to do so. Is there a function or something? Thanks. Quote Link to comment Share on other sites More sharing options...
Alex Posted November 12, 2009 Share Posted November 12, 2009 You can't do this with PHP alone, but with some JavaScript you can. Here's an example: <script type="text/javascript"> window.onload = setTimeout('document.getElementById("something").innerHTML = ""', 1000); </script> <?php echo '<span id="something">Some text here..</span>'; ?> Quote Link to comment Share on other sites More sharing options...
Gayner Posted November 12, 2009 Share Posted November 12, 2009 ALEXWD"s code works perfect i just tested it, lol i needed this, thanks. Quote Link to comment Share on other sites More sharing options...
neex1233 Posted November 12, 2009 Author Share Posted November 12, 2009 Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.