[PHP] multiple entries in the same field

2001-07-04 Thread Jamie Saunders
Hi, In a MySQL database I have one field that holds several entries seperated by a comma (e.g. item1,item2,item3). What I want to do is to get these items from the db from a PHP script and display each item on it's own line (e.g. item1britem2britem3). Is there anyway of doing this easily by

Re: [PHP] multiple entries in the same field

2001-07-04 Thread Wieger Uffink
Hi Jamie, use explode() or split(), these will split up your string eand return the resulting elements as an array. Generally speaking its not reaally good practice to store multiple entries as a comma sepparated string in one db field, since it takes down the data integrity of your database.