Jump to content

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


ksumanth
 Share

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.