Category: PHP Tutorial

python tutorials and learn python

Created with Sketch.

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

PHP dirname

PHP dirname Summary: in this tutorial, you will learn how to use the PHP dirname() function to get the parent directory’s path of a file or directory path. Introduction to the PHP dirname() function The dirname() function accepts a path and returns a parent directory’s path: dirname ( string $path , int $levels = 1…
Read more

PHP glob

PHP glob Summary: in this tutorial, you’ll learn how to use the PHP glob() function to get the list of files and directories that match a pattern. Introduction to the PHP glob() function The glob() function finds pathnames that match a pattern. Here’s the syntax of the glob() function: glob ( string $pattern , int…
Read more

PHP Directory

PHP Directory Summary: in this tutorial, you will learn how to work with directories using various built-in functions in PHP. Basic directory operations PHP provides a set of handy functions that allow you to work with directories effectively. To manage a directory, you need to get a directory handle. To get the directory handle of…
Read more