To get a substring in a string, use the substr function. See the example:
substr
<?php $arr = substr('abcdef', 1, 3); echo $arr; ?>
Code execution result:
'bcd'