Remove First N Characters from String using PHP

substr function

<?php

$text = 'HelloWorld!';
$n = 5;
$result = substr($text, $n);

echo $result; // World!

Leave a Comment

Cancel reply

Your email address will not be published.