PHP中的可变性的phpword和cicle

时间:2019-06-21 07:15:09

标签: phpword

我为函数使用了两个cicle for php,我需要为cicle中的变量编写docx模板。.

<?php
echo '<table class="tavola-pitagora">';
$deb = array();
$TAN = 3;
$RATA = 250;
$durata = 60;
$b = ( 1 + ( $TAN / 1200 ) );
for ( $i = 0; $i <= $durata; $i++ ) {
    echo '<tr>';
    $i = $i + 6;
    $deb[ $i ] = ( ( $durata + 6 ) - $i );
    $deb[ $i ] = ( pow( $b, -$deb[ $i ] ) );
    $deb[ $i ] = ( ( 1 - $deb[ $i ] ) / ( $TAN / 1200 ) ) * $RATA;


}


for ( $y = 0; $y <= ( $durata + 6 ); $y++ ) {
    $y = $y + 6;
    echo '<td>' . number_format( $deb[ $y ], 2, ',', '.' ) . '</td>';
    echo "&nbsp" . "&nbsp" . "&nbsp" . "&nbsp" . "&nbsp" . "&nbsp" . "&nbsp" . "&nbsp";
    $pippo = $deb[ 6 ];
    //echo $pippo;
    //$pluto = $deb[$y];
    //echo $pluto."</br>";

    //echo $pippo;
    $pluto = $deb[ $y ];
    echo '<td>' . number_format( ( $pippo ) - ( $pluto ), 2, ',', '.' ) . "</br>" . '</td>';
    //echo number_format(($deb[6])-($deb[$y]),2, ',', '.');
    echo '</tr>';
}
echo '</table>';

我需要在docx模板字中使用PHPword编写$ pippo- $ pluto的结果,我该怎么做?

0 个答案:

没有答案