Output the elements in the array that are multiples of 5 to the drop-down menu and place the elements in the array in the & lt; li & gt; label, different parity li backgrounds: find the elements in the array as numbers.
// Output the elements in the array that are multiples of 5 to the drop-down menu
// Place the elements in the array
In the tag, the parity li background is different.
// Find the element in the array as a number
Reply to discussion (solution)
". $ Item.": "") ;}); echo"$ Option"; // Place the elements in the array
In the tag, the parity li background is different $ I = 0; $ li = implode ("", array_map (function ($ n) use (& $ I) {$ I ++; return $ I % 2 = 0? "$ N":"
$ N";}, $ Arr); echo"
"; // Find the element in the array as a number Type $ arr = array (12312, '123', 'sdfsdf ', 'asdasd123 '); $ r = array_reduce ($ arr, function ($ r, $ item) {is_null ($ r) & $ r = array (); return is_numeric ($ item )? Array_merge ($ r, array ($ item): $ r ;}); print_r ($ r) ;?>