ASP to PHP
Hi. i need to convert the following ASP into PHP;
Function RemoveWhiteSpace(strText) 'function to remove white spaces from post code
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "\s+"
RegEx.Multiline = True
RegEx.Global = True
strText = RegEx.Replace(strText, "")
RemoveWhiteSpace = strText
End Function
what would be the best way to do this. i dont want to use trim as i need to remove the whitespace from the entire string and not just the ends. Thank you in advance.
|