Discount !! E-commerce App With Backend Source Code Video and Voice Chatting App Firebase Chatting App Source Code Complete Gym App BLoC State Management Source Code Complete Study App Buy Ticket Booking App Source Code Payment App Buy Travel App With Backend Source Code Complete Chat App Udemy Course Special Offer Online Learning Course App (BLoC)
substr() function is used when you want to remove part of the string. It takes three parameters.
See the substr() structure
substr(string,start,length);
First one for mentioning the string,
Second one is for where to start to,
Third one is for how many strings to keep,
<?php
echo substr("Hello world dbestech ",0, 6);
?>
The output is
hello
The above function starts to count the string from the 0th character and keep 6 of them and remove rest of them.