PHP去掉第一个字符和最后一个字符

<?php
$txt=substr($txt,2,strlen($txt)-1); //去掉第一个字符和最后一个字符
?>
原文地址:https://www.cnblogs.com/hhf821244793/p/12676196.html