This is a rather old moment, but I thought that it could not hinder to add my solution to the heap. This is a bit more code than other solutions, but I'm fine with that.
I need something with some flexibility, so I created a utility method that allows you to set what the final delimiter should be (for example, you could use an ampersand) and use or not use the Oxford comma. It also correctly processes lists with 0, 1, and 2 points (something doesnβt do a lot of answers here)
$androidVersions = ['Donut', 'Eclair', 'Froyo', 'Gingerbread', 'Honeycomb', 'Ice Cream Sandwich', 'Jellybean', 'Kit Kat', 'Lollipop', 'Marshmallow']; echo joinListWithFinalSeparator(array_slice($androidVersions, 0, 1)); // Donut echo joinListWithFinalSeparator(array_slice($androidVersions, 0, 2)); // Donut and Eclair echo joinListWithFinalSeparator($androidVersions); // Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwich, Jellybean, Kit Kat, Lollipop, and Marshmallow echo joinListWithFinalSeparator($androidVersions, '&', false); // Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwich, Jellybean, Kit Kat, Lollipop & Marshmallow function joinListWithFinalSeparator(array $arr, $lastSeparator = 'and', $oxfordComma = true) { if (count($arr) > 1) { return sprintf( '%s%s %s %s', implode(', ', array_slice($arr, 0, -1)), $oxfordComma && count($arr) > 2 ? ',':'', $lastSeparator ?: '', array_pop($arr) ); } // not a fan of this, but it the simplest way to return a string from an array of 0-1 items without warnings return implode('', $arr); }