php - Unused variable warning (editor) array_walk -
following code generates editor warning not using $key
in code. idea how avoid warning? there similar check done php
parses too?
array_walk($services, function(&$value, $key) { $value = str_replace('xxx', '', $value); });
just remove it.
array_walk($services, function(&$value) { $value = str_replace('xxx', '', $value); });
but note it's editor warning, it's not php warning.
Comments
Post a Comment