<?php$array = array("uno", "dos", "tres");$string = implode(", ", $array);echo substr_replace ($string, " y ", strrpos($string, ","), 2);
Standard input is empty
uno, dos y tres
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!