CodeLobster IDE

Free cross-platform PHP IDE (HTML, PHP, CSS, JavaScript, Python code editor) with support Drupal, Joomla, Twig, JQuery, BackboneJS, LaravelJS, Node.js, CodeIgniter, CakePHP, Laravel, Magento, MeteorJS, Phalcon, Symfony, VueJS, WordPress, Yii
It is currently Sat Feb 24, 2024 10:34 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: how to define variables
PostPosted: Mon Apr 03, 2023 10:06 pm 
Offline

Joined: Mon Apr 03, 2023 9:50 pm
Posts: 5
Quote:
Hi,I'm trying to determine how to define variables

amtpaid, prevbal, latechg, etc. are database fields that are: decimal 8,2 and may be 0.00 or more:

I'm asking for the correct way to code these variables to reflect their value and been advised:

Code:
$amtpaid = (double)'amtpaid';,
$amtpaid=$row['amtpaid'];,
$amtpaid = (int)'amtpaid';
$amtpaid = 0;

Quote:
or told to "use different logic, change language, everything except "just do this".

Obviously I'm resetting the values of the fields to 0 since after update, no matter the amtpaid,
prevbal, latechg, etc. are always 0.00

I want to code them so that php understands their values and I can refer to them. Will someone
answer this question?


Top
 Profile  
 
 Post subject: Re: how to define variables
PostPosted: Sat Apr 29, 2023 4:51 am 
Offline

Joined: Sat Apr 29, 2023 4:50 am
Posts: 1
A variable is a characteristic that can be measured and that can assume different values. Height, age, income, province or country of birth, grades obtained at school and type of housing are all examples of variables. Variables may be classified into two main categories: categorical and numeric.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2016 phpBB Group