Create Array Without Keys From Comma Separated String Using Php
You can't convey an array without keys. But at that spot is workaround to become inwards possible.
Grab the comma separated string together with piece of job explode business office to practise array. Use the implode business office on resulting array, together with you lot volition become the overnice array without keys.
Example
Grab the comma separated string together with piece of job explode business office to practise array. Use the implode business office on resulting array, together with you lot volition become the overnice array without keys.
Example
$strings = "my, name, is, Anup"; $arraydata = explode(",", trim($strings)); echo '$arr = array("'.implode('", "', $arraydata).'");'; //output // $arr = array("my", "name", "is", "Anup");Sumber http://developer-paradize.blogspot.com
Comments
Post a Comment