The developers over at PhpBB think I have no right to use an XML declaration the point of completely burying the code that intentionally goes in to the templates to remove it.
It's definitely a string that matches ?xml string and it will remove it regardless of how many times you declare it or what line it is on. Putting a symbol between ? and xml will break this script...but it will also break the declaration. So does anyone have an idea of what PHP syntax might be conjoining the ? and XML strings?
Finding the XML declaration remover in PhpBB?
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Code: Select all
// Using capturing parentheses
$str = preg_replace('/(\?).(xml)/', '$1$2', $str);
// Or using lookaround
$str = preg_replace('/(?<=\?).(?=xml)/', '', $str);