We're going to introduce you today.
PHP Array to string implode ()
- Php
- $vegetables [0] = "corn";
- $vegetables [1] = "broccoli";
- $vegetables [2] = "zucchini";
- $ text implode(",", $vegetables);
- Echo $text;
- ?>
Run results
Corn,broccoli,zucchini
2 PHP string to array explode ()
- Php
- $ text "corn, broccoli, zucchini";
- $ Vegetables explode(",", $text);
- Print_r ($vegetables);
- ?>
Operation Result:
- Array
- (
- [0] => corn
- [1] => broccoli
- [2] => zucchini
The above two pieces of code are what we introduce to you about PHP array to string and PHP string to the array of related code.
http://www.bkjia.com/PHPjc/446366.html www.bkjia.com true http://www.bkjia.com/PHPjc/446366.html techarticle today we introduce you to PHP array to string implode ()? PHP $vegetables [0]= "corn"; $vegetables [1]= "Broccoli"; $vegetables [2]= "zucchini"; $ text = implode (",", $vegetables) ...