Link to home
Create AccountLog in
Avatar of willsherwood
willsherwood

asked on

PHP string functions - minimize whitespace chars

what's the easiest way to convert whitespace-like chars to a single space
i've already done a trim(), and want one or more (spaces, tabs, etc)  to reduce to a single space for matching in a table.

thanks
SOLUTION
Avatar of Loganathan Natarajan
Loganathan Natarajan
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of willsherwood
willsherwood

ASKER

thanks - the first example seems to delete all spaces, which is not the goal.  thanks all.