perl - chain array operations in PHP -


How do I work with chain operations to work on lists in PHP?

In Perl, I can write

  print included " N ", the map {$ _. = '& Lt; Td> $ _ '& Lt; / Td & gt; '} sort_are_frame_db ();  

Is there a skilled production in modern PHP? I read about array_map but this is a normal task and is not very powerful.

You have to be more clear with php, and will create your own sort function which is actually Returns sorted array

  & lt ;? Php function get_sorted ($ Arr) {sort ($ arr); Return $ arr; } Function get_array_from_db () {return array (7,5,3,2,9); } Print included ("\ n", array_map (function ($ _) {return " $ _ ";}, get_sorted (get_array_from_db ())));  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -