I have a item_desc field within my items table. Can I enter a description but make each line automatically go to the next line and add a bullet in front of each line of text.
<?php echo $row_items["itemDesc"]; ?>
You could enter sufficient HTML into the description field that the output would do all that. But I strongly recommend against it.
I think you will have much greater flexibility storing only data in the database and using PHP to wrap formatting around it. If you need to change the formatting and you do the formatting in PHP, then you only have to change the PHP script. If you store the formatting with the data in the field, you'll have to perform a complex update on every record in the table to make a formatting change.
You could even develop some kind for templating system, where your PHP script retrieves the data from your items table, a template from your template table, then combine the two. Although this is slightly more complex than storing templates in PHP code, it's not a lot more complex. And you if need to change the formatting, you only need to change one record in one table.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.