krisis Posted December 10, 2007 Share Posted December 10, 2007 Hi! I need php function. I have a number " {$settings.info_box_withdraw_funds_generated} " but due to some mistakes I need to - 7 it. {$settings.info_box_withdraw_funds_generated} - 7 function. Can everyone please help me out with this? Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/ Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 You just answered your own question. Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411039 Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 Heh, no, it's not working! I know it all should be in function lines or so... I'm new to this Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411043 Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 Post your actual code. Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411048 Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 It's <tr> <td class=menutxt><b>Payments sent</b></td> <td class=menutxt align=right> $ {$settings.info_box_withdraw_funds_generated} </td> </tr> And I need to have minus 7 this number {$settings.info_box_withdraw_funds_generated} Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411050 Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 Sorry, I'm not sure what that is exactly, but its not php. Maybe it some sort of templating engine? Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411052 Share on other sites More sharing options...
Crew-Portal Posted December 10, 2007 Share Posted December 10, 2007 $subnum = 7; (($subnum) - {$settings.info_box_withdraw_funds_generated} - $) Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411053 Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 I tried this code <td class=menutxt align=right> $subnum = 7; (($subnum) - {$settings.info_box_withdraw_funds_generated} - $) </td> but in real web site view it doesn't show the result. it's: Payments sent $subnum = 7; (($subnum) - 2.00 - $) btw, I'm editing .tpl page but it's integrated in .php pages Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411059 Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 You'll need to read the docs for your template engine. .tpl files are not part of php. Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411062 Share on other sites More sharing options...
Crew-Portal Posted December 10, 2007 Share Posted December 10, 2007 .tpl files are template files. There will be a main PHP script they link to. You gotta edit the data in thier! Youll know if its the right file if its got {$settings.info_box_withdraw_funds_generated} somewhere in it. But the code will all be in PHP! Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411072 Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 Ok, I get it now. Many thanks! Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411084 Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 Now I found this, I hope this can be modified if ($settings['show_info_box_total_withdraw'] == 1) { if ($settings[crontab_stats] == 1) { $settings['info_box_withdraw_funds_generated'] = number_format (abs ($stats[total_withdraw]), 2); } } Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411089 Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 Try... $settings['info_box_withdraw_funds_generated'] = number_format (abs ($row['sum']), 2)-7; Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411091 Share on other sites More sharing options...
krisis Posted December 10, 2007 Author Share Posted December 10, 2007 Yes, it works! Thanks, that's all finally Link to comment https://forums.phpfreaks.com/topic/81020-solved-im-looking-for-simple-minus-function/#findComment-411110 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.