Jump to content

[SOLVED] Dynamic array help


nuttycoder

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/142201-solved-dynamic-array-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.