Jump to content

Automatic creation of list when getting text from DB


melting_dog

Recommended Posts

Hi all,

 

Weird one: I am re-working a site for a client. Their old site currently grabs text from a DB and somehow automatically puts it into a <ul>. The only thing to signify a <li> is a linebreak. So if I entered:

 

Item 1

Item 2

Item 3

 

into the database, they would come out looking like:

 

  • Item1
  • Item 2
  • Item 3

 

on the site. Anyone know of a way to recreate this?

 

An example of this in action is here: http://www.postureperfection.com.au/Chairs/Amore_Chair/p/495/ (please remember - I am redesigning the site!)

 

Thanks heaps!

Thanks for that Thorpe,

 

But could you help me out a little more - I havent used the explode function before. I try it and it prints the entire array eg: Array ( [0] =>Item 1 [1]=>Item 2 etc. Also, how would I tell it to explode after a line break?

 

Thanks heaps!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.