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. Link to comment https://forums.phpfreaks.com/topic/181203-solved-erase-echo/ 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>'; ?> Link to comment https://forums.phpfreaks.com/topic/181203-solved-erase-echo/#findComment-955962 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. Link to comment https://forums.phpfreaks.com/topic/181203-solved-erase-echo/#findComment-955963 Share on other sites More sharing options...
neex1233 Posted November 12, 2009 Author Share Posted November 12, 2009 Thanks! Link to comment https://forums.phpfreaks.com/topic/181203-solved-erase-echo/#findComment-956163 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.