How To Replace Variables in RTF File in PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mwansari
    New Member
    • May 2012
    • 2

    How To Replace Variables in RTF File in PHP

    Hi,

    I want to know how to replace variables of RTF file using PHP language.

    I have HotDocs created document where variables are like this.
    Code:
    Name: «demo_Last name» «demo_First name»
    DOB: «demo_DOB»
    SSN: «demo_SSN»
    Country: «Country Name» (Variables may include spaces.)
    And also conditions like this:

    Code:
    «IF XYZ = "Some String"»
    DRE I«ELSE IF XYZ = "Some other string"» DRE II
    «ELSE IF XYZ = "else string"»DRE III«END IF»
    
    «IF PQR = "1"» DRE I «ELSE IF PQR = "2"»DRE IV«ELSE IF PQR = "2" AND XYZ = "Some String"» Response«END IF»
    Do I have to create something like compiler?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    yes, you would have to create a HotDocs compiler. but personally I wouldn’t try to write my own if there is already one available.
    Last edited by Dormilich; May 29 '12, 01:11 PM.

    Comment

    • mwansari
      New Member
      • May 2012
      • 2

      #3
      They have compiler in .NET. I want to do this in PHP.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        ask them if they can make a compiler for PHP. IMHO it is not worth to try to make that one yourself (unless you want to do a large-scale home project)

        Comment

        Working...