Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select hobbies from peoples_hobbies where person_id = 5;
- shopping
- fishing
- coding
- shopping, fishing, coding
- select person_id, group_concat(hobbies separator ', ')
- from peoples_hobbies group by person_id;
- select group_concat(hobbies separator ', ')
- from peoples_hobbies where person_id = 5 group by 'all';
- <?php
- $array = array('shopping', 'fishing', 'coding'); // filling an array
- $comma_separated = implode(",", $array); // imploding the array
- echo $comma_separated; // lastname,email,phone
- ?>
- <?php
- $array(explode('lastname,email,phone', $str, 2));
- ?>
Add Comment
Please, Sign In to add comment