Mar 29th 2014, 6:40:14
can we have them back? i'd like to have a signature.
Edited By: qzjul on Jul 18th 2016, 5:06:50
See Original Post
See Original Post
Mar 29th 2014, 6:40:14
Jul 18th 2016, 13:05:59
Jul 18th 2016, 23:02:01
Jul 19th 2016, 8:45:46
Jul 19th 2016, 12:49:33
Jul 20th 2016, 6:24:47
<?php
// uncomment the appropiate linebreak
define(LINEBREAK, '<br>');
//define(LINEBREAK, "\r");
//define(LINEBREAK, "\n");
// this sets maximum lines per sig
$maxlines = 4;
// splits line breaks into arrays
$pieces = strpos($string, LINEBREAK) ? explode(LINEBREAK, $string) : $string;
// counts line breaks
$numOfBreaks = count($pieces);
// defines maxlines appropiately
$maxlines = $numOfBreaks - $maxlines;
// removes extra lines
for ($i=0;$i<$maxlines;$i++){
array_pop($pieces);
}
// places arrays back together
$whole = implode($pieces, LINEBREAK);
//echos new signature
print_r($whole);
Jul 22nd 2016, 17:44:34