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
 $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

Popular posts from this blog

What Are The Main Components of a Computer System

Top Qualities To Look For In An IT Support Team

How To Integrate Google Adwords Api Into Codeigniter?