If it is negative, it will return the maximum number of substrings minus the number specified in $limit. If the limit is unspecified the function will return all of the substrings possible. Int $limit: the maximum amount of substrings you want the original string split into. String $toexplode: The original string that you want to turn into an array. String $delimiter: What character you want to split the string by. Syntax: Array explode(string $delimiter, string $toexplode, ).The explode function splits a string by a given delimiter and returns an array with all the substrings between the delimiters Please note that delimiters can be any character, these are simply the most common ones.Īrray String Functions These functions are used to convert strings to arrays, and vice-versa Delimiters are special characters used to separate parts of a string.When at all possible, use triple equals(=) with these functions, as some may return more than one type.The word before the function name denotes the default return type, e.g.The square brackets denote an optional parameter.It will include proper usage, a description of what the function does, as well as what the function returns under normal circumstances. This will act as more of a reference than a complete tutorial, as there are many functions to cover. These functions include trimming whitespace, properly escaping strings for security, splitting strings, and many more. String functions are built-in language constructs and functions that are designed to manipulate and display strings.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |