What is the best way to store and retrieve an array in PHP/MySQL DB

attetraverevsz

New Member
Lets say I wanted to build an app that will pull url links from a database and show 50 on a page. I am just using links as an example. What if I had to store multiple values, an array into 1 mysql field for each link/record posted. If there is 5 items for every Link, I could have an array of 5 items on the page, a list of 5 items seperated by commas, or I could use json encode/decode, What would be best for performance for saving a link to the DB and showing it on the page, something like implode/explode with a list of item, json encode/decode, or serialize/un-serialize the array?
 
Back
Top