$collection->map($callback)

Map a function to each item in the collection

  • $callback (function)
  • return ($collection)

Example

function someFunction ($item)  {
  //some function
  }
}
$collection->map('someFunction');

Is something missing or incorrect? Edit this page on Github…