Jump to content

maxelct

Members
  • Posts

    37
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

maxelct's Achievements

Member

Member (2/5)

0

Reputation

  1. thanks again - I get it!
  2. Hi I am using phpword to create a set of word documents - pupil reports. Its all working well except that I am using a html form to generate some text - which of course has minimal formatting - <p>, <h1>, <ol> etc I have been able to get the text into the field in my worddoc template but only if I put it through htmlspecialchars - - - $d=htmlspecialchars($descriptors["Number"]['H2'], ENT_HTML5); $templateProcessor->setValue('SpeakingDesc', $d); but of course I then end up with text like this: Is there a way to retain some measure of formatting for the text? Thanks
  3. that seems to work!!! I have been fiddling around for ages, and getting marked down on stackoverflow for being thick! I would like to understand how it works - So its doing $descriptors['Science' ]['P2']='text text text' - why doesn't it create a brand new 'Science array' for every level/descriptor each time - somehow it seems to cleverly know that the array science has already been created and add a new key=>value pair within the science array BTW thanks so much!
  4. Hi I have a data set that is coming from a db table like this science, p1, some text science, p2, some more text maths, p1, some text maths, p2, some more text All together that are going to be around 200 entries. These are subject descriptions/levels that will be written out into documents for pupils class reports. I am trying to create an array that looks like this: $descriptors = [ 'science' => [ 'p1' => 'text', 'p2' => 'more text' ], 'maths; => [ 'p1'=> 'text', 'p2'=> 'more text'. ] etc etc ]; At the moment i have an array $subject_list which goes 'Speaking', 'Science', 'Maths' etc I loop through the $subject_list and perform a query which returns the subject, the grade(the p1 bit) and the text How do I turn this data in the 2d array shown above. I am trying to put an array with a name into an array but I can't figure it out. This is as far as I could get $desc[]=array('subject'=>$sub, 'grade'=>$row['grades'], $row['descriptor']); but this is creating an array which has about 200 arrays in it - all with 3 items - not what I want How can I do this please
  5. phppdocx looks interesting. But I think I need something that doesn't involve licensing (long story). Our docs have to be saved into a folder, and then personal comments have to be added into.
  6. Thanks - hadn't come across that option in my research. It all needs to be automatic - the user is going to be generting 100s (potentailly) of different docs/reports.
  7. Hi I am running a WAMP local server with php 5.4.12. I have to create a number of word.docx files from a database. My research suggests lots of possibilities. My forms are not going to be complex, but I do need to be able to save / print them Using headers wont give me much control I don't think. I know this is a bit of a vague question - but could anyone advise on which approach might be best for me? I'd really appreciate it Edward
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.