Replace More Than 1 Instance with PHP

Posted by Belgin Fish on Stack Overflow See other posts from Stack Overflow or by Belgin Fish
Published on 2010-04-12T18:10:56Z Indexed on 2010/04/12 18:13 UTC
Read the original article Hit count: 214

Filed under:

Hey, say i have

sometext-somemore--test---test2

how could I have it replace all instaces where there are more than 1 - and have it replace them with just 1 so it would look like this

sometext-somemore-test-test2

© Stack Overflow or respective owner

Related posts about replace