Usunięcie tagów html z tekstu
$art_text = preg_replace("/(align|class|style|clear)\=\"([^\"]*)\"/", '', $art_text);
$art_text = strip_tags($art_text, '<p><br><strong><b><em><u><strike>');
echo $art_text;
Usunięcie tagów html z tekstu
$art_text = preg_replace("/(align|class|style|clear)\=\"([^\"]*)\"/", '', $art_text);
$art_text = strip_tags($art_text, '<p><br><strong><b><em><u><strike>');
echo $art_text;
$test='http://kody.wig.pl/strony-stare-2006_11-all.html';
$test='http://kody.wig.pl/strony-nowe-2012_11-1233.html';
echo $test;
preg_match("/(-(?P([0-9]+|all)))?\.html$/", $test, $back);
print_r($back);
$tagi_arr=array_unique($tagi_arr);
$tagi_arr=array_filter($tagi_arr, create_function('$val', '{if(strlen($val)>1)return $val;}'));
lub też
$tagi_arr=array_filter($tagi_arr, 'string_min2');
function string_min2($val) {
if(strlen($val)>1)
return $val;
}
$tagi_arr=array_values($tagi_arr);
Wybranie elementów dłuższych niż jeden znak
$log_time=date('Y-m-d_His');
if($log && date('Y-m-d')=='2012-08-11' && date('H')<=6) {
error_log($sql."",3,'log/select_'.$log_time.'.log');
}
Zapis, gdy data to 2012-08-11 i godzina mniejsza równa 6.
foreach (glob('/home/log/*') as $filename) { unlink($filename); }