oceans Posted June 22, 2007 Share Posted June 22, 2007 Dear people, I did this define function ConvertSingleBackSlash($string) { return str_replace("\\", "-", $string); } later call $Input[$i]=filter_var($Input[$i]=FILTER_CALLBACK,array("options"=>"ConvertSingleBackSlash")); it works fine in ver 5 but not in ver 4, is there a substitue for this. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/56655-replace-character-not-working-in-ver-4/ Share on other sites More sharing options...
btherl Posted June 22, 2007 Share Posted June 22, 2007 You can use a foreach() loop instead of filter_var(). I think it'll be more readable too. There's no need to use such high level programming for such a simple task. Quote Link to comment https://forums.phpfreaks.com/topic/56655-replace-character-not-working-in-ver-4/#findComment-279862 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.