function letterToUpper($text)
/* Функция для того, что бы делать первую букву предложения заглавной.*/
{
foreach ($text as $value){
$upperlatter = preg_split('//u', $value, -1, PREG_SPLIT_NO_EMPTY
); if ($upperlatter[0] == ' ') {
} else {
}
$upperlatter[] = '.';
$value = implode('', $upperlatter); }
return $text;
}
ZnVuY3Rpb24gbGV0dGVyVG9VcHBlcigkdGV4dCkKCS8qINCk0YPQvdC60YbQuNGPINC00LvRjyDRgtC+0LPQviwg0YfRgtC+INCx0Ysg0LTQtdC70LDRgtGMINC/0LXRgNCy0YPRjiDQsdGD0LrQstGDINC/0YDQtdC00LvQvtC20LXQvdC40Y8g0LfQsNCz0LvQsNCy0L3QvtC5LiovCgl7CgkJJHRleHQgPSBwcmVnX3NwbGl0KCcvXFwuL3UnLCAkdGV4dCk7CgkJcHJpbnRfcigkdGV4dCk7CgkJZm9yZWFjaCAoJHRleHQgYXMgJHZhbHVlKXsKCQkJJHVwcGVybGF0dGVyID0gcHJlZ19zcGxpdCgnLy91JywgJHZhbHVlLCAtMSwgUFJFR19TUExJVF9OT19FTVBUWSk7CgkJCWlmICgkdXBwZXJsYXR0ZXJbMF0gPT0gJyAnKSB7CgkJCQkkdXBwZXJsYXR0ZXJbMV0gPSBtYl9zdHJ0b3VwcGVyKCR1cHBlcmxhdHRlclsxXSk7CgkJCX0gZWxzZSB7CgkJCQkkdXBwZXJsYXR0ZXJbMF0gPSBtYl9zdHJ0b3VwcGVyKCR1cHBlcmxhdHRlclswXSk7CgkJCX0KCQkJJHVwcGVybGF0dGVyW10gPSAnLic7CgkJCSR2YWx1ZSA9IGltcGxvZGUoJycsICR1cHBlcmxhdHRlcik7CgkJCXByaW50X3IoJHZhbHVlKTsKCQl9CgkJCgkJJHRleHQgPSBpbXBsb2RlKCcnLCAkdGV4dCk7CgkJcmV0dXJuICR0ZXh0OwoJfQ==
function letterToUpper($text)
/* Функция для того, что бы делать первую букву предложения заглавной.*/
{
$text = preg_split('/\\./u', $text);
print_r($text);
foreach ($text as $value){
$upperlatter = preg_split('//u', $value, -1, PREG_SPLIT_NO_EMPTY);
if ($upperlatter[0] == ' ') {
$upperlatter[1] = mb_strtoupper($upperlatter[1]);
} else {
$upperlatter[0] = mb_strtoupper($upperlatter[0]);
}
$upperlatter[] = '.';
$value = implode('', $upperlatter);
print_r($value);
}
$text = implode('', $text);
return $text;
}