Php Remove First And Last Char

[Solved] Php Remove First And Last Char | Php - Code Explorer | yomemimo.com
Question : php remove first and last char

Answered by : jonah-lawrence

<?php
$string = "hello world";
// create a substring starting 1 character from
// the beginning and ending 1 character from the end
$trimmed = substr($string, 1, -1);
echo $trimmed; // prints "ello worl"

Source : | Last Update : Sun, 06 Jun 21

Question : remove first 4 characters in string php

Answered by : frightened-fox-tpevq20mvlz5

$str = "The quick brown fox jumps over the lazy dog."
$str2 = substr($str, 4); // "quick brown fox jumps over the lazy dog."

Source : | Last Update : Mon, 17 Jan 22

Answers related to php remove first and last char

Code Explorer Popular Question For Php