salman_ahad@yahoo.com Posted October 15, 2009 Share Posted October 15, 2009 Here is what I am trying to do example: Para1[123.456.789!] 3 sentences Para2[abc?defghij.klmnop! etc] 3+ sentences It should split the paras into sentences based on delimiters (.?!), count the length of characters in those sentences. If any sentence more than "120" charaters it should attach "..." at the end of sentence. Then email the sentences in an excel(attached) example.xls 123. 456. 789! abc? defghij. klmnop! dskasdjkasjkdjfkdgjkfgjflhkglfhkdljsakfjdkf... Please send me sample code, please don't just tell me I can use explode() function or split....etc Quote Link to comment Share on other sites More sharing options...
salman_ahad@yahoo.com Posted October 16, 2009 Author Share Posted October 16, 2009 for example if ($_POST['Submit']) //taking user input when Submit { $para = $_POST['para']; assigning it to para } $sent = explode(".",$para); exploding para when the "." is read echo $sent[0]; echo $sent[1]; How do I enter to next line in between echo's? echo $sent[2]; echo $sent[3]; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.