数组转字符串
- <?php
- $test[0] = "1";
- $test[1] = "2";
- $test[2] = "3";
- $text = implode(",", $test);
- echo $text;
- ?>
字符串转数组
- <?php
- $text = "1,2,3";
- $test= explode(", ", $text);
- print_r($test);
- ?>
数组转字符串
- <?php
- $test[0] = "1";
- $test[1] = "2";
- $test[2] = "3";
- $text = implode(",", $test);
- echo $text;
- ?>
字符串转数组