<?php $string = 'foobr'; $charFirst = substr($string, 0, 1); $charLast = substr($string, strlen($string) - 1, 1); echo $charFirst . PHP_EOL; echo $charLast . PHP_EOL;
You have javascript disabled. You will not be able to edit any code.