$original = '1234567890';
echo substr_replace($original, '***', 3, 3);
//output: 123***7890
<?php
$message = "плохое_слово1 xорошее
плохое_слово2";
$badWords = array("плохое_слово1","плохое_слово2");
$matches = array();
$matchFound = preg_match_all(
"/(" . implode($badWords,"|") . ")/mui",
$message,
$matches
);
if ($matchFound) {
$words = array_unique($matches[0]);
foreach($words as $word) {
echo "<li>" . $word . "</li>";
}
echo "</ul>";
}
<OrderStatus>(.+?)<\\\/OrderStatus>
$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0)
->setCellValue('A1', 'Hello')
->setCellValue('B2', 'world!')
->setCellValue('D2', 'Betrag €');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));