$get = str_replace("-", "", $get);
Chciałbym to połączyć z strlen, tak aby wstawić to jako pierwszy parametr w str_replace i żeby usunęło mi wszystkie znaki jednoliterowe.
if ($_GET['kategoria']=='2') { if ($_GET['co']) { $pattern = '/\s[\S]{1}\s/i'; $replacement = ''; }
$string = 'a dsf dssde f vcbv fewr+s4 4 dfg dfg a a'; $pattern = '/\b[a-zA-z0-9]{1}\b/i'; $replacement = '';