nuttycoder Posted January 24, 2009 Share Posted January 24, 2009 I am trying to pull an array from a database but I cannot get it to work as a test I have 2 arrays one static and one coming from a database with the exacly same data inside The using var_dump to see their contents $one = array("1","2","3","4"); $two = array($mrow->mList); var_dump($one); echo "<br/>"; var_dump($two); The first one works but the second one does not the second one comes from the database this is the output I am getting: array(4) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "3" [3]=> string(1) "4" } array(1) { [0]=> string(15) ""1","2","3","4"" } This is how it looks in my database: mList "1","2","3","4" Can someone tell me what am going wrong I seem to have been at this for hours and getting no where. Quote Link to comment https://forums.phpfreaks.com/topic/142201-solved-dynamic-array-help/ Share on other sites More sharing options...
rubing Posted January 24, 2009 Share Posted January 24, 2009 $two = explode(",", $mrow->mList); Quote Link to comment https://forums.phpfreaks.com/topic/142201-solved-dynamic-array-help/#findComment-744950 Share on other sites More sharing options...
nuttycoder Posted January 24, 2009 Author Share Posted January 24, 2009 Thank you!! Worked like a charm :0) Quote Link to comment https://forums.phpfreaks.com/topic/142201-solved-dynamic-array-help/#findComment-744953 Share on other sites More sharing options...
rubing Posted January 24, 2009 Share Posted January 24, 2009 No problem. Quote Link to comment https://forums.phpfreaks.com/topic/142201-solved-dynamic-array-help/#findComment-744959 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.