Blog

python tutorials and learn python

Created with Sketch.

PHP ltrim

PHP ltrim Summary: in this tutorial, you’ll learn how to use the PHP ltrim() function to remove whitespace characters or other characters from the beginning of a string. Introduction to the PHP ltrim() function The PHP ltrim() function removes the whitespace characters or other characters from the beginning of a string. Here’s the syntax of…
Read more

PHP trim

PHP trim Summary: in this tutorial, you’ll learn how to use the PHP trim() function to remove whitespace or other characters from both ends of a string. Introduction to the PHP trim() function The trim() function removes the whitespaces or other characters from the beginning and end of a string. Here’s the syntax of the…
Read more

php explode

php explode Summary: in this tutorial, you’ll learn how to use the PHP explode() function to split a string by a separator into an array of strings. Introduction to the PHP explode() function The PHP explode() function returns an array of strings by splitting a string by a separator. The following shows the syntax of…
Read more

PHP implode

PHP implode Summary: in this tutorial, you’ll learn how to use the PHP implode() function to join a list of string using a separator. Introduction to the PHP implode() function The PHP implode() function allows you to join an array of strings by a separator. Here’s the syntax of the implode() function: implode ( string…
Read more

PHP str_replace

PHP str_replace Summary: in this tutorial, you’ll learn how to use the PHP str_replace() function to replace all occurrences of a substring with a new string Introduction to the PHP str_replace() function The PHP str_replace() function returns a new string with all occurrences of a substring replaced with another string. The following shows the syntax…
Read more

PHP strpos

PHP strpos Summary: in this tutorial, you’ll learn how to use the PHP strpos() function to get the index of the first occurrence of a substring in a string. Introduction to the PHP strpos() function The PHP strpos() function returns the index of the first occurrence of a substring within a string. Here’s the syntax…
Read more

PHP substr

PHP substr Summary: in this tutorial, you’ll learn how to use the PHP substr() function to extract a substring from a string. Introduction to the PHP substr() function The substr() function accepts a string and returns a substring from the string. Here’s the syntax of the substr() function: substr ( string $string , int $offset…
Read more

PHP strlen

PHP strlen Summary: in this tutorial, you’ll learn how to use the PHP strlen() function to get the length of a string. Introduction to the PHP strlen() function The strlen() function returns the length of a specified string. Here’s the syntax of the strlen() function: strlen ( string $string ) : int Code language: PHP…
Read more

PHP pathinfo

PHP pathinfo Summary: in this tutorial, you will learn how to use the PHP pathinfo() function to get the information on a file path. Introduction to the PHP pathinfo() function The PHP pathinfo() function accepts a file path and returns its components: pathinfo ( string $path , int $flags = PATHINFO_ALL ) : array|string Code…
Read more

PHP basename

PHP basename Summary: in this tutorial, you will learn how to use the PHP basename() function to get the trailing name component of a path. Introduction to the PHP basename() function The basename() function returns the trailing name component of path: basename ( string $path , string $suffix = “” ) : string Code language:…
Read more