Unstoppable Domains

[Resolved] Help needed for preg_replace.

Spaceship Spaceship
Watch

baris22

Established Member
Impact
1
Help needed for preg_replace.

Hello all,

Original text is:

Are you a teacher?????????????????????
No: I am not!!!!!!!!!!!!!

I want to able to make it like this:

Are you a teacher?
No: I am not!

I want to remove some characters if they are more than certain number.



I tried this but did not work

PHP:
$pattern     = array('/&+/','/\?+/','/#+/','/!+/'); 
$values     = array('&','?','#','!'); 
$description = preg_replace($pattern, $values, $description);

Thanks
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
works 100% for me.
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back