replace text on your page php something like element.innerhtml

Solution:
You can use PHP to spit out javascript that does the replacing. There won't be a pure PHP solution to this since PHP is server-side and doesn't have access to the rendering of the page on the client side.
Suppose the text you need to change is in a<div>
tag named 'replaceMe'. You will want to use the ob_flush() functions in PHP to force out the javascript at the time you need it to display. The PHP to initialize that is
if (ob_get_level() == 0) ob_start();
Then, each time you need to update, you have something like this in your PHP code that adds to the body of the page:
echo '<script type="text/javascript" language="javascript">';
echo "document.getElementById('replaceMe').innerHTML = 'Text for this iteration';";
echo '</script>';
flush(); ob_flush();
Of course if you want to make it easier for yourself, you can make a PHP function to print all this out given an argument containing the text to replace.
Then at the end you need to have
ob_end_flush();
Answer
Solution:
to replace some text try str_replace http://de3.php.net/manual/de/function.str-replace.php or case insensitive str_ireplace
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: please make sure the php redis extension is installed and enabled.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.