string - PHP count lines in a table -


the code use display string inside table (this part of row in bigger table):

<tr>  <td>  </td>   <td colspan="6">    <b>some data:</b>    <br>    <?php     echo $proceedings; // need know how many lines take up.     //max 28 lines   ?>  </td> 

$proceedings can size , may contain newline characters (which make easy) of time contain no newline characters. need know how many lines string takes in table. table same width (height automatically adjust).

some information; predecessor (this not code) decided make web page later print pdf. pdf needs contain lot of data, on bottom of every page (a4 format) needs have digital signature, decided count number of lines information takes , see if exceeds maximum number of lines on a4, if put in signature , continue on next page (or in case underneath signature).

i know there must other ways create pdf file nice layout however, php skills aren't starting on take more time fixing 'small' problem.

i hope have said understandable.

edit:
have decided switch contingency plan i'm going count average number of characters fit on 1 line (165) , divide total amount of characters in string 165 , see how many lines produce.

if there on 28 lines i'll create new page.


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -