i’m just wondering how I can replace multiple instances of – with just one using php,
for example say I have
test----test---3
what could I do to replace the multiple instances of – with just 1 so it would be
test-test-3
thanks 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Remove every repeating character:
Remove specific repeating character:
Remove specific repeating character the ‘ugly’ way:
Result for all snippets: