How to convert php array to comma separation: First create a PHP sample file; then use the "implode(",", $_POST['gouwutype']);" method to convert the array to comma separation The string can be.
Recommendation: "PHP Video Tutorial"
php array to comma separated string
Solution:
If $_POST['gouwutype'] is an array array('lastname', 'email', 'phone');
if(isset($_POST['gouwutype'])){ $gouwutype = implode(",", $_POST['gouwutype']);//结果'lastname,email,phone' }
The above is the detailed content of How to convert php array to comma separation. For more information, please follow other related articles on the PHP Chinese website!