remove background color using pure php


Keywords:php 


Question: 

I want to remove this background color after 10 seconds using php. I don't want to use js, css. Is it possible to remove background color using pure php code?

<?php $running_location = '<p style="background:#E1FEE0;"></p>' ?>;

1 Answer: 

PHP runs on the server. All the work it does is finished before the browser receives the page.

Server side code cannot alter the page on the client after the page has been delivered.

You have to use a client side technology for this. Sensible approaches would be CSS animations or JavaScript. (NB: I'm assuming CSS animations can do this, I haven't used them enough to be sure).

Less sensible options would be to use a refresh either via HTML meta or HTTP to load an entirely new page from the server (which is identical but without the background colour).