Deepak Deepak - 9 days ago 5
PHP Question

how to remove comma and display records

I have a database table package_details which include fields


  1. package_id

  2. features

  3. description



in features field I have stored data like feature1,fea2,fea3 and so on. I have separated features by comma.

I have to display records. Now my question is how to remove comma and display records one by one like

feature1
fea2
fea3


can anyone help me?
Thanks.

Ima Ima
Answer
$array = explode(',' $data); 

will explode your string based on comma