0

Hi, I'm wondering what type of mysqlfield would be advantageous for outputting the containing text as a bullit list in php and if the text should be formatted a certain way.

I would be supergrateful for an example! :p

Take care
Adam

2
Contributors
3
Replies
5
Views
5 Years
Discussion Span
Last Post by adishardis
0

Either char or varchar will do, but there are differences between these two data types. It depends on exactly how you want to store this information in the database.

Have your written any of the PHP code yet, and are stuck on something specific?

0

right now I have a text field filled with text seperated by semicolons to represent where the "bullets" should be. I'm open to change the format of the text in any way to simplify the output of the bullitlist.

I Havn't started coding the php output as I don't want to start in the wrong end and having to do it all over if some basic stuff as if fieldtype is wrong or if it's better to format the ingoing text in some specific way.

Cheers

0

Ok, if someone finds this thread, this is how i echo a textfield in mysql as a bulletlist. The text have semicolons where the breaks and bullets should be:

 <?php 
                    $Keyfindings2 = explode(';', $Keyfindings);
                    echo "<ul style=\" list-style-type:upper-roman;\">\n";
                        foreach( $Keyfindings2 as $item )
                            {
                            echo "<li>$item</li><br />\n";
                            }
                            echo "</ul>";?>

Boooom, when you know the answer it seems so obvious :)

Have a good one!
/Adam

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.