Hi. I've searched google and did'nt found what I am looking for. I don't know why because I think this is an easy solution. I want to remove all white spaces between tags from an html string I found a regex solution but it gives me a compilation error. can someone help me? here is the code: $input=preg_replace( "/(?:(?<=\>)|(?<=\/\))(\s+)(?=\<\/?)/","", $input ); Code (markup): Thanks
trim — Strip whitespace (or other characters) from the beginning and end of a string i want to remove whitespaces and new lines between all the tags