Link to home
Start Free TrialLog in
Avatar of akiles99
akiles99Flag for India

asked on

php help needed

Hi,

I face a problem with a hyphen in a string..
eg:many strings in the sentence are like eg:cars-and-trucks---are--fast-----sometimes

So i need a script which will make it ascars-and-trucks-are-fast-sometimes .

The script will remove multiple '-' from a string. I there is more then one '-' (minus the quotes) in a row, I want to string output to remove the extra connecting '-'.

Thanks ee,
akiles
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of akiles99

ASKER

Good