Have an account? Sign in
Login  Register  Facebook
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.
Started: September 22, 2011 Latest Activity: September 22, 2011 phparray
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
In: September 22, 2011

Thanks jooria, It really works bro.
September 22, 2011

Your Answer

xDo you want to answer this question? Please login or create an account to post your answer