|
Posted by misiek on 05/04/07 18:46
>
> So you want to remove certain characters from a string? I've said it
> before and I'll say it again: why do people insist upon using regular
> expressions to do things that str_* functions can handle in a much
> easier and faster way? Not only will it run faster, but you'll save
> yourself from exactly the kind of headaches you're experiencing.
>
> $chars = array('&', "'", '/', '_', '-');
> $output = str_replace($chars, '', $string);
>
ok to by zadzialalo, a jak odnosnie if statement
Najpierw chcem sprawdzic czy w stringu jest taki znak a pozniej go usunac ?
Navigation:
[Reply to this message]
|