Jump to content

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


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.

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