“Usuń ostatnią literę PHP” Kod odpowiedzi

PHP usuń ostatni znak w ciągu

//Remove the last character using substr
$string = substr($string, 0, -1);
Kasmin Nicko

Usuń ostatnią literę PHP

<?php
echo substr('abcdef',0, -1);     // abcde
?>
Vast Vulture

PHP usuń pierwszy i ostatni char

<?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"
DenverCoder1

PHP usuń ostatni znak z ciągu

$hell = substr('hello', 0, -1);
Grepper

PHP Substr usuń ostatnie 4 znaki

echo substr($string, 0, -3);
Helpful Hippopotamus

PHP usuń ostatnie 3 litery z ciągu

echo substr($string, 0, -3);
Jolly Jackal

Odpowiedzi podobne do “Usuń ostatnią literę PHP”

Pytania podobne do “Usuń ostatnią literę PHP”

Więcej pokrewnych odpowiedzi na “Usuń ostatnią literę PHP” w PHP

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu