ltrim()
functionYou can use the PHP ltrim()
function to strip whitespace from the beginning of a string.
Let's take a look at an example to understand how this function really works:
<?php
$my_str = ' Hello World!';
echo strlen($my_str); // Outputs: 16
$trimmed_str = ltrim($my_str);
echo strlen($trimmed_str); // Outputs: 12
?>
i hope you like this one.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
How to detect if enter key is pressed in a text input field using jQuery
Use the keypress event To check wheth...Difference between private, public, and protected modifiers in PHP
If you have worked in object orient prog...Automatic Page Load and Ajax Request Progress Bar with Pace.js
Pace.js is the simple javascript library...How to Create Custom Maintenance Page in Laravel 7.x Example
In this article, I will apportion you si...Encrypt and Decrypt Data in NodeJS using Crypto
We will share with you in this article h...