That regex might plain confuse people...
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($strinit would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will [i]usually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just ually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_lim I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will [i]usually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string...[/quote]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will [i]usually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limitThat regex might plain confuse people...[/quote]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will [i]usually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$lasThat regex might plain confuse people...[/quote]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will [i]usually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr:D
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will [i]usually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickling through three variables like that? Or is that it?I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) lain confuse people...[/quote]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will [i]usually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickliimple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickling through three variables like that? Or is that it?uote]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickling through three variables like that? Or is that it?ay), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickling through three variables like that? Or is that it?h-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentenmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will [i]usually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
That regex might plain confuse people...[/quote]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickling through three variables like that? Or is that it?5c]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickling through three variable come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickling through three variables like that? Or is that it?That regex might plain confuse people...[/quote]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write thae people...[/quote]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity,
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curs what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$strThat regex might plain confuse people...[/quote]
Mmmhmm. I'm sure it would me.
Here's what I think I'm going to go with-- I've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will [i]usually[/i] fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is tI've decided I don't really much care about the sentences that come in over 288 characters (the text I'm working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickling through three variables like that? Or is that it? working with will
usually fall under, anyway), so something simple like this will do the trick, I think:
Code: Select all
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I co
function trim_paragraph($string, $max_len) {
$string_limit = substr($string, 0, $max_len);
$last_sentence = strrpos($string, '. ');
$final_para = substr($string, 0, $last_sentence+1);
return $final_para;
}
Just out of curiosity, is there a way I could write that function without trickling through three variables like that? Or is that it?