if (($pos - ($maxChar/2)) < 0) { $startPos = 0; } else { $startPos = ($pos - ($maxChar/2)); $chunk .= '...'; }