mysql - How to adding string when converting database to excel with PHP? -
i have code, post code wanna ask about. row 5, want adding word "%" because percent containt data need use "%" behind numbers. code :
for ($y=0; $y<$jm; $y++) { ++$i; xlswritenumber($xlsrow,0,"$i" ); xlswritelabel($xlsrow,1,$data['arsip'][$y]); xlswritelabel($xlsrow,2,$data['income'][$y]); xlswritelabel($xlsrow,3,$data['outcome'][$y]); xlswritelabel($xlsrow,4,$data['efficiency'][$y]); xlswritelabel($xlsrow,5,number_format($data['percent'][$y],2)); }
i've tried making new variable , adding behind code :
$symbol = "%"; xlswritelabel($xlsrow,5,number_format($data['percent'][$y],2, echo $symbol));
but didn't work. wrong? can me? in advance! ;)
Comments
Post a Comment