Name

ltrim()

Synopsis

    string ltrim ( string str [, string trim_chars] )

The ltrim() function works like the normal trim(), except it only trims whitespace from the lefthand side of a string.

    $string = ltrim(" testing ");
    // $string is "testing "

Get PHP in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.