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!

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.