I\'m working on Cake PHP. Please give me a solution to solve this:
Controller.php:
public function test() {
$this->set(\'users_l
You can use the String class. It has a very cool method called toList(), and it's used to print an array with an 'and' before the last element.
App::uses('String', 'Utility');
echo String::toList($users_list);
Check out the documentation: http://book.cakephp.org/2.0/en/core-utility-libraries/string.html