<?php $data = '• Rohit • Mohit • Khusi'; $names = preg_split('/\s*•\s*/', $data, -1, PREG_SPLIT_NO_EMPTY); foreach ($names as $i => $name) { echo '- ', $name, $i === count($names) - 1 ? '.' : '<br/>'; }
You have javascript disabled. You will not be able to edit any code.