Split String into Array using PHP

explode function

<?php

$text = 'First,Second,Third';
$data = explode(',', $text);

echo $data[0].' '.$data[1].' '.$data[2];

Leave a Comment

Cancel reply

Your email address will not be published.