mysql - Database implementation of formatting -


i have database this:

text_id | sentence_id | word_id | word   | meaning     4          2           124              ja    4          2           124          lubię    4          2           124     trains.   pociągi 

where "ja", "lubię" , "pociągi" unique translation in particular context.

the thing need sometimes, format text, example bold word "trains" in on website. or surround 1 of sentences with:

<h1> </h1> 

tag.

i have no idea how save information formatting in not obtrusive way.

thanks help.

ps: need no fancy formatting, need save information new paragraphs "p" headers "h1" "h2" , on.

maybe save information image between particular sentences.

ps2: use mysql.

from understand take information in database , export out html file of sort.

in order must:

1) retrieve information database using query similar following.

   $query = select word, meaning $dbname  

2) style fields using similar following.

   echo <h1 class="field"> <?php echo $resultsfromquery ?> </h1>  

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -