Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/31/2015 in all areas

  1. Вот этой книге в книге David Powers - PHP Solutions Dynamic Web Design Made Easy есть полезная ф-ция, может пригодится. /*функция извлечения заданого колличества первых предложений из текста */function getFirst($text, $number=2) { $sentences = preg_split('/([.?!]["\']?\s)/', $text, $number+1, PREG_SPLIT_DELIM_CAPTURE); if (count($sentences) > $number * 2) { $remainder = array_pop($sentences); } else {$remainder = ''; } $result = array(); $result[0] = implode('', $sentences); $result[1] = $remainder; return $result;}
    1 point
This leaderboard is set to Kiev/GMT+02:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy