You can try this
foreach ($tab_os as $key => $value){
$tab_os[$key] = str_replace('#',' ',$value);
}
but really, str_replace accepts and returns arrays so this shouldn't be the problem. see docs
I have tried and tested this code, try it here: http://codepad.org/Ok1fZ16O
$tab_os = array( array( "Windows#XP", 1 ), array( "Windows#7", 1 ) );
foreach ($tab_os as $key => $value) {
$tab_os[$key] = str_replace('#', ' ', $value);
}
var_dump($tab_os);