If there is one thing that I cannot understand (or find out), then this is the syntax preg_replace. I need help in removing all possible characters (space, tab, new line, etc.) Between >and <.
Meaning, I have this XML:
<?xml version=\"1.0\" encoding=\"UTF-8\"?><bl> <snd>BANK</snd> <rcv>ME</rcv> <intid>773264</intid> <date>17072012</date></bl>
I need to see this:
<?xml version=\"1.0\" encoding=\"UTF-8\"?><bl><snd>BANK</snd><rcv>ME</rcv><intid>773264</intid><date>17072012</date></bl>
So far I have come up with this:
$this -> data = preg_replace('\>(.*?)<\', '><', $data);
But he does not even come close to what I need. The solution will be appreciated.
source
share