Skip to content
Advertisement

How to call array_map() without using a closure

I have something like this:

JavaScript

What I want to do is to use strlen($string) directly in array_map, but when I try it it won’t work.. Why is the reason?

Something like this:

JavaScript

Advertisement

Answer

Your syntax is a little off:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement