<?php $likes = 'Apple, Samsung, Microsoft'; $portion = strrchr($likes, ','); $likes = str_replace($portion, (" and" . substr($portion, 1, -1)), $likes); var_dump($likes);
You have javascript disabled. You will not be able to edit any code.