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. 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. 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
Archived
This topic is now archived and is closed to further replies.