Latest Post

How to extract comma separated column values from database using php

How to extract comma separated column values from database using php


How to extract comma separated column values from database using php


If your values are comma separated then explode the field.

<?php

include("db_connect.php");
$result = mysql_query("SELECT * FROM  students", $con);

while($rows = mysql_fetch_array($result)) {
   $mark=explode(',', $rows['marks']);//what will do here
   foreach($mark as $out) {
      echo $out;
   }

}

?>

No comments