php - preg_replace('/[^a-zZ-Z0-9]/', NULL, $action['class']) -


I found a line of code in the project that I am trying to modify / add extension.

  $ Controller = 'Controller' Preg_replace ('/ [^ a-zZ-Z0- 9] /', tap, $ verb ['square']);   

But I'm not sure this line is the dose which I think is the dose: Capitalizing the first letter, i.e. "order" in "order" < P> I tried some tests, but this does not make any sense, because it starts to remove the capital letters in words.

This will only remove the first alphanumeric character in the $ verb ['square'] .

If you want to uppercase the letter first, then use it: $ action ['class'] = ucfirst ($ action ['class']) ;

Comments