Question : php remove last character in string
Answered by : kasmin
//Remove the last character using substr
$string = substr($string, 0, -1);
Source : | Last Update : Thu, 09 Apr 20
Question : php remove last character from string
Answered by : code-grepper
$hell = substr('hello', 0, -1);
Source : | Last Update : Mon, 11 Nov 19
Question : remove last character from string in php
Answered by : manoj-kumar
$arrStr = 'Str1, Str2, str3, ';
echo rtrim($arrStr, ", "); //Str1, Str2, str3
echo substr_replace($arrStr, "", -2); //Str1, Str2, str3
echo substr($arrStr, 0, -2); // Str1, Str2, str3
Source : | Last Update : Tue, 09 Feb 21
Question : php remove last newline from string
Answered by : geeky-bravo
$string = rtrim($string_to_remove);
Source : https://stackoverflow.com/a/3530111/212889 | Last Update : Thu, 01 Jul 21
Question : remove last character from string php
Answered by : moin-ahmed
$newarraynama = rtrim($arraynama, ", ");
Source : https://stackoverflow.com/questions/5592994/remove-the-last-character-from-a-string | Last Update : Sat, 01 May 21
Question : php remove last character from string
Answered by : tough-teira-jbi7oxbw9kdg
$newarraynama = rtrim($arraynama, ", ");
Source : https://stackoverflow.com/questions/5592994/remove-the-last-character-from-a-string | Last Update : Thu, 30 Sep 21