PHP ltrim() function - Trim beginning of string (left trim) in PHP @helpvideoguru
PHP ltrim() function - Trim beginning of string (left trim) in PHP  @helpvideoguru
Uploaded February 2013 | Updated November 2026, 5 hours ago
In this video I will show you the PHP ltrim() function

==============

By default (without a $charlist), ltrim() removes the following whitespace from the left side of a string:

' ' spaces
'\t' tabs
'\n' new lines
'\r' carriage returns
'\0' NUL-bytes

============

Use the form:
ltrim($your_string)
for the default behaviour

============

Or use the form:
ltrim($your_string, $your_charlist)
to specify which characters you want to remove

============

You can specify each character individually ...

============

... or you can use ranges within your character set using the a..z double dot format.

This sample is functionally identical to the previous one.

============

Check out the code on this page for example usage!

============

If you found this video helpful, please subscribe to HelpVideoGuru on YouTube
PHP ltrim() function - Trim beginning of string (left trim) in PHPWindows 8 Control Panel - How to Find It - Category View and Icon ViewHow to Install and Setup the Google Chrome BrowserWindows 8 - Map a Network Path to a Drive Letter - Fast Network Connection - Map a Network DrivePhotoshop - Blur Your Background - Desaturate Your BackgroundWindows 7 - Manually Run Windows UpdatesWindows 8 - Virtual Memory - Pagefile Size Settings - Performance and Speed Settings✔️ Microsoft Word - Change Heading Style - Edit Default Fonts - Office 365Photoshop CC - Moving Selections - Move a Selection, or the Contents of a SelectionPHP rtrim() function - Trim end of string (right trim) in PHPWindows 7 - Hide Desktop Icons - Show Desktop IconsWordpress - Make a Website, not a Blog - Create New Pages, add Videos, Add Logo to Header and MORE
Help Video Guru |

PHP ltrim() function - Trim beginning of string (left trim) in PHP

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER