webdev.ramyash@gmail.com

Web Development: November 2015


PHP, MySql, JQuery, Ajax,Wordpress,Woocommerce,HTML,CSS,JavaScript,DOM,jQuery,PHP,SQL,XML,Bootstrap,Web

Get comma separated column values from database using php

<?php

$con=mysql_connect('localhost','root','');

mysql_select_db('db',$con);

$result = mysql_query("SELECT * FROM  posts");

while($rows = mysql_fetch_array($result)) {

   $title=explode(',', $rows['title']);

   foreach($title as $row) {

      echo $row."<br>";

   }

}

?>