Skip to content

Instantly share code, notes, and snippets.

@tombh
Created August 18, 2014 09:52
Show Gist options
  • Save tombh/317b8168a65d97a88f83 to your computer and use it in GitHub Desktop.
Save tombh/317b8168a65d97a88f83 to your computer and use it in GitHub Desktop.
<?php
$chocolates = ['maltesers', 'minstrels', 'green & blacks', 'montezuma'];
$we_ate = array_slice($chocolates, 0, 2);
// Outputs: ['maltesers', 'minstrels']
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment