PeggyBuckham Posted June 18, 2012 Share Posted June 18, 2012 I used a plugin to create the data in a database, now I am displaying the data and writing code to search/sort. My problem is that I am not familiar with arrays that are put into a single field in a database. I’m not even sure of the correct “name” for data in this format so I can find info about it and learn. So it anyone could please direct me to as tutorial or documentation about this. I would appreciate it. Here is a sample of the code contained in one field of the database. Ultimately I will need to display this data with a <br/> seperateing each element in the array. I also need to understand it better so I can search the fields that are displayed this way. I also really want to learn about it, because I believe it is fairly common and I should understand it a:4:{i:0;s:32:"Green";i:1;s:26:"Red";i:2;s:31:"Blue";i:3;s:33:"Yellow";} Quote Link to comment Share on other sites More sharing options...
Jessica Posted June 18, 2012 Share Posted June 18, 2012 That is serialized data. Use unserialize on it. Quote Link to comment Share on other sites More sharing options...
PeggyBuckham Posted June 18, 2012 Author Share Posted June 18, 2012 Thank You!!! I was a little desperate so I asked the question on a couple of other forums. Here is a little more inforation that might help out the next person * "a:4" says what follows will be an array with 4 elements * "i:0" says this is the 0th index in the array * "s:32" says what comes next is a string * "Green" is that string * the rest just follows this pattern Quote Link to comment 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.