How to display data that store in one fields?
Hi guys i have a problem.
I have something to know bro, is it possible to combine all the data in one fields and it will display separately? Example: I have 3 fields (id, description, link) and i store this in the ff. withe a separator "|": description fields This is a description1 | This is a description2 | This is a description3 | This is a description4 link fields Link1 | Link2 | Link3 | Link4 And it will display like this : 1. This is a description1 Link1 2. This is a description2 Link2 3. This is a description3 Link3 4. This is a description4 Link 4 Thanks in advance to your help guys. Your help is highly appreciated.
1 Answer
sure you can just use explode()
assume that you already get the links from the db: $links = "http://www.jooria.com|http://www.google.com|http://www.yahoo.com"; foreach (explode("|",$links) as $link) { echo "link: $link</br>".; } Posted: MacOS 1 of 1 people found this answer helpful. Did you? Yes No Thanks jooria, It really works bro. |
© Advanced Web Core. All rights reserved