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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -