Category: PHP Tutorial

python tutorials and learn python

Created with Sketch.

PHP strtoupper

PHP strtoupper Summary: in this tutorial, you’ll learn how to use the PHP strtoupper() function to convert all alphabetic characters of a string to uppercase. Introduction to the PHP strtoupper() function The strtoupper() function accepts a string and returns a new string with all alphabetic characters converted to uppercase. The following shows the syntax of…
Read more

PHP strtolower

PHP strtolower Summary: in this tutorial, you’ll learn how to use the PHP strtolower() function to make the lowercase version of a string. Introduction to the PHP strtolower() function The strtolower() function accepts a string and returns a new string with all alphabetic characters converted to lowercase. Here’s the syntax of the strtolower() function: strtolower…
Read more

PHP str_ends_with

PHP str_ends_with Summary: in this tutorial, you’ll learn how to use the PHP str_ends_with() function to check if a string ends with a substring. Introduction to the PHP str_ends_with() function The str_ends_with() function performs a case-sensitive search and checks if a string ends with a substring. Here’s the syntax of the str_ends_with() function: str_ends_with (…
Read more

PHP str_starts_with

PHP str_starts_with Summary: in this tutorial, you’ll learn how to use the PHP str_starts_with() function to check if a string starts with a substring. Introduction to the PHP str_starts_with() function The str_starts_with() function performs a case-senstive search and checks if a string starts with a substring: str_starts_with ( string $haystack , string $needle ) :…
Read more

PHP str_contains

PHP str_contains Summary: in this tutorial, you’ll learn how to use the PHP str_contains() function to check if a string contains a substring. Introduction to the PHP str_contains() function The PHP str_contains() function checks if a string contains a substring. Here’s the syntax of the str_contains() function: str_contains ( string $haystack , string $needle )…
Read more

PHP htmlspecialchars

PHP htmlspecialchars Summary: in this tutorial, you’ll learn how to use the PHP htmlspecialchars() function to prevent XSS attacks. What Is XSS? XSS stands for cross-site scripting. It’s a kind of attack where a hacker injects malicious client code into a web page’s output. For example, if you have a comment section on your page…
Read more

PHP rtrim

PHP rtrim Summary: in this tutorial, you’ll learn how to use the PHP rtrim() function to remove whitespace or other characters from the end of a string. Introduction to the PHP rtrim() function To remove the whitespace characters or other characters from the end of a string, you use the PHP rtrim() function. The following…
Read more

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