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;
select
u_id,
case
when work_start > '2012-12-01'::date then work_start
else '2012-12-01'::date
end::date + generate_series(1, 31) - 1 as ndate
from n_users
where
u_id = 300
select
a_title,
regexp_replace(a_title, ' +', ' ', 'g')
from articles
where
a_status = 't'
and a_title ~ ' '
update articles
set
a_title = regexp_replace(a_title, ',', ' ')
where
a_status = 't'
and a_title ~ ','
update articles
set
a_title = regexp_replace(a_title, ' +', ' ', 'g')
where
a_status = 't'
and a_title ~ ' '
$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);