|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
Best way to set up a "letter"
Morning,
I am trying to figure out the best way to do this. I have a bunch of letters that an office sends out. I want to save the body of the letter in a table as well as another table for the personal information. The problem is some of the letters midway imbed the personal information. Is there a better or easier way to do this than what I am doing currently, which is a field for each section/paragraph and have the code something like this? php Code:
Thanks for any thoughts. Laura |
|
#2
|
|||
|
|||
|
RE: Best way to set up a "letter"
Well, if you want to save the body of a letter in a table and then be able to replace data within the body, I'd template the letter somehow. For instance, I might save the following in the table:
Code:
Dear <<first_name>>, Thanks for visiting with us on <<vist_date>. I hope to see you again! Sincerely, <<managers_name>> Then, I'd have PHP code that pulled the personal info from the other table and did substr_replace()'s on the template tags I made up. Is that the sort of thing you are looking for? |
|
#3
|
|||
|
|||
|
RE: Best way to set up a "letter"
Thanks Matt,
Yes thats what I'm looking for...some way to make the template in a table. I'll check that out. Thanks for the tip. Laura |
|
#4
|
|||
|
|||
|
RE: Best way to set up a "letter"
I tried your suggestion Matt it worked like a charm.
Thanks Again. Laura |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > Best way to set up a "letter" |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|