[email protected] 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 Link to comment https://forums.phpfreaks.com/topic/177828-solved-spliting-paragraph-into-sentences-and-attach-in-excel/ Share on other sites More sharing options...
[email protected] 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]; Link to comment https://forums.phpfreaks.com/topic/177828-solved-spliting-paragraph-into-sentences-and-attach-in-excel/#findComment-937776 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.