Is there a way to limit exactly what ltrim removes in PHP.
I had a the following outcome:
$str = \"axxMyString\"; $newStr = ltrim($str, \"ax\"); // resu
ltrim() manual:
Strip whitespace (or other characters) from the beginning of a string.
So...
$newStr = ltrim($str, "ax");
This will remove every character 'a' and 'x' at the beginning of string $str.
'a'
'x'
$str
Use substr() to get part of string you need.