Jump to content

[SOLVED] how can i avoid long words on string??


yami007

Recommended Posts

You could create a regex to break up these words but i feel this be down to your HTML/CSS !

 

here's a concept of adding a space after the 5th repeated letter

$para = "hellllllllllllllllllllo";
echo preg_replace('/(\w{5})(\1)/im', '\1 \2', $para);
//returns helllll llllllllll lllllo

You could create a regex to break up these words but i feel this be down to your HTML/CSS !

 

here's a concept of adding a space after the 5th repeated letter

$para = "hellllllllllllllllllllo";
echo preg_replace('/(\w{5})(\1)/im', '\1 \2', $para);
//returns helllll llllllllll lllllo

can i do this for a text?? in textarea

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.