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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.