help needed in logic

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
samyphp
Forum Newbie
Posts: 2
Joined: Thu Oct 29, 2009 12:40 am

help needed in logic

Post by samyphp »

hi there,

i want to replace the 'n' number of dots in following content to '3' dots ('...'). this is a dynamic content. i am stuck here. please anybody help me.

"Technology is a broad concept that....................... deals with human as well as other animal species' usage and knowledge of tools and crafts, and.................... how it affects a species' ability to control and adapt.................................................. to its environment. Technology is a term with origins in the Greek technología (τεχνολογία) — téchnē (τέχνη), 'craft' and -logía (-λογία), the study of something, or the branch of knowledge................... of a discipline.[1] However, a strict.......................... definition is elusive; "technology" can refer to material objects of use to humanity, such as ........machines, hardware or utensils, but can also encompass broader themes, including sys...............................................tems, methods of organization, and techniques. The term can either be applied generally or to specific areas: examples....................................................................... include "construction technology", "medical technology", or "state-of-the-art technology"

thanks,
Palanisamy
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: help needed in logic

Post by Jonah Bron »

Code: Select all

while (strpos($text, '....') !== false){
    $text = str_replace('....', '...', $text);
}
BTW, you should post in the code forum.
Post Reply