-1

I am trying to replace class="fa fa-play mi" with class="fa fa-volume-up" aria-hidden="true" but no success.

echo str_replace( '<i class="fa fa-play mi"></i>'); 

with:

<i class="fa fa-volume-up" aria-hidden="true"></i>
2
  • Can you please elaborate your query Aug 4, 2017 at 7:28
  • please see update question
    – sanjay
    Aug 4, 2017 at 7:35

1 Answer 1

2

The str_replace() function should have 3 parameters, so your code should be like this:

echo str_replace(
    'class="fa fa-play mi"',
    'class="fa fa-play mi" aria-hidden="true"',
    '<i class="fa fa-play mi"></i>'
);
2
  • but this is not working , can you convert this with filter hook
    – sanjay
    Aug 4, 2017 at 8:51
  • Hi. You didn't explain anything about your situation, you just asked for replace. Please add details about where and how are you trying to do this. It's not possible to answer it without knowing this.
    – Johansson
    Aug 4, 2017 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.