Jump to content

In paragraph "."(fullstop) ends the sentence end (limitation)


ksumanth

Recommended Posts

hello friends,

 

I have one paragraph , in that middle of the paragraph i just give "."(fullstop). If "." comes the sentence have to end.

 

 

I know how to give the limitation of the words in paragraph but i want to know If "." comes then the sentence should end .

 

can any one help me out.

 

Thanks sumanth.

hello friends,

 

I have one paragraph , in that middle of the paragraph i just give "."(fullstop). If "." comes the sentence have to end.

 

 

I know how to give the limitation of the words in paragraph but i want to know If "." comes then the sentence should end .

 

can any one help me out.

 

Thanks sumanth.

 

I'm guessing English isn't your native language?

 

In PHP:

 

<?php
$s="Here is the first. Here is the second. Here is the third";
list($c) = explode('.', $s);
$c .= '.';
echo $c;
?>

 

That's probably the easiest way. Explode breaks the string into segments seperated by the period, and the list($c) = assigns the first array element to $c. The line $c .= '.'; just adds the period back onto the string.

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.