mysql - PHP convert one array to different formatted array -
my query
$sql ="select ttrack tblcourse tcoursecode = 'azure'"; $rs = mysql_query($sql); $row_rs_course_category = mysql_fetch_assoc($rs);
gives me value array ( [ttrack] => ms,cloud )
but need conver array format php
array ( [0] => ms [1] => cloud )
how do in php
you can use explode
function this.
$newvalue = explode(",", $row_rs_course_category['ttrack']);
Comments
Post a Comment