1. function explode (); This is the string conversion to an array, implode (); This is the conversion of arrays to strings.
$array =explode (separator, $string);
$string =implode (glue, $array);
The key to using and understanding these two functions is the delimiter (separator) and the glue (glue) relationship. When you convert an array to a string, you will set the glue--the character or code that will be inserted between the array values in the generated string.
1. When I am working on a project, I always run into a SQL statement to determine if this value is not in between.
SELECT* from ' shipping_types ' where ' id ' IN 1< Span class= "syntax_punct syntax_punct_listsep" >, 2 < Span class= "syntax_punct syntax_punct_bracket_close_round") limit 0 , 30
When we use in, the value inside is an array from the database, we are going to convert, we are going to convert the array to a string.
PHP gives us a function:
$arr: Array.
$string = Implode (', ', $arr);
PHP Arrays converted to strings