Topics
PHP String
About this topic: Articles tagged __TAG__
Showing 29 articlesRelated tags
Topics
Articles
Showing 29 articles
How-tos
How to Remove the Last Character From a String in PHP
This article introduces how to remove the last character from a string in PHP. It includes the rtrim() function and the substr() function. Discover the best methods for string …
↗
How-tos
How to Convert String to Boolean in PHP
This tutorial introduces how to change string data to Boolean data types in PHP. Learn various methods, including type casting, filter_var(), and custom functions, to effectively …
↗
How-tos
How to Ignore Case Sensitivity When Comparing Strings in PHP
This tutorial demonstrates how to ignore character cases in PHP when comparing strings. Discover practical methods like strcasecmp(), strtolower(), and array comparisons to enhance …
↗
How-tos
How to Convert an Array to a String in PHP
This article introduces how to convert an array to a string in PHP. Learn various methods including using implode(), join(), JSON encoding, and custom functions. Discover practical …
↗
How-tos
How to Convert String to Date and Date-Time in PHP
Learn how to convert strings to date and date-time formats in PHP using methods like strtotime, date, DateTime::createFromFormat, and date_create_from_format. This comprehensive …
↗
How-tos
How to Replace String in PHP
This article introduces how to replace part of a string in PHP using the str_replace() function. Learn the syntax, explore practical examples, and discover tips for effective …
↗
How-tos
How to Get PHP String Length
This article introduces how to measure string size in bytes in PHP. It includes detailed explanations and code examples for the strlen() and mb_strlen() functions, ensuring you can …
↗
How-tos
How to Get URL Data With QUERY_STRING in PHP
Learn how to get URL data with QUERY_STRING in PHP. This article provides clear examples and detailed explanations to help you access and manipulate URL parameters effectively. …
↗
How-tos
How to Convert a String Into an Array in PHP
This tutorial demonstrates the use of different functions in turning a string into an array in PHP.
↗
How-tos
How to Get Parameters From a URL String in PHP
This article introduces how to get parameters from a url string in PHP. It includes parse_url() function, parse_str() function and $_GET variable.
↗
How-tos
How to Extract Numbers From a String in PHP
This article introduces how to extract numbers from a string in PHP. It includes preg_match_all() function, filter_var() function and preg_replace() function.
↗
How-tos
How to Check if a String Contains a Substring in PHP
This article introduces how to check if a string contains a substring in PHP.
↗
How-tos
How to Write Multi-Line Strings in PHP
This article introduces how to write multi-line strings in PHP. It includes an escape sequence and concatenation assignment operator.
↗
How-tos
How to Concatenate Strings in PHP
This article introduces how to d string concatenation in PHP. It includes the concatenation operator, concatenation assignment operator, and the sprintf() function.
↗
How-tos
How to Convert String to Float in PHP
This article introduces how to convert string to float in PHP. It includes type casting, floatval() function, and number_format() function.
↗
How-tos
How to Generate Random String in PHP
This tutorial demonstrates randomly generation of string in PHP
↗
How-tos
How to Remove Special Character in PHP
This tutorial shows the removal of special character from string in PHP
↗
How-tos
How to Escape Quotation Marks in PHP
This tutorial introduces how to escape quotation marks in PHP
↗
How-tos
How to Convert Object to String in PHP
This tutorial introduces how to convert an object to a string in PHP
↗
How-tos
How to Replace Space With Dash in PHP
PHP provides three functions to replace string/array with another string/array in the string/array.
↗
How-tos
How to Compare Strings Using == Operator and STRCMP Function in PHP
This article shows how == operator and the strcmp function can compare strings in PHP.
↗
How-tos
How to Check if a String Starts With a Specified String in PHP
This article introduces how to check if a string starts with a specified string in PHP. It includes substr() function, strpos() function and strncmp() function
↗
How-tos
How to Get the Last Character of a String in PHP
This article introduces how to get the last char of a string in PHP. It includes substr() function, direct string access method and for loop method.
↗
How-tos
How to Convert a String to a Number in PHP
This article introduces how to convert a string to a number in PHP. It includes inval() function, settype() function and explicit type casting.
↗
No articles found
Try clearing the filters.