Skip to content
Advertisement

How to remove empty CSS property by PHP?

I have a string like this

JavaScript

I want to convert this string-like this

JavaScript

How can I achieve this?

Advertisement

Answer

Try:

JavaScript

although, the output would include color:blue; too and not just background-color:red; for .header?

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement