| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| [php] adding variables; me... again | |
|---|---|
| Tweet Topic Started: Feb 17 2005, 08:28 PM (346 Views) | |
| mathiaus | Feb 17 2005, 08:28 PM Post #1 |
|
mathiaus maximus™
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
me again sorry. right then. I have set the value of some variables and am trying to add them together but I can't get it to work. $subtotal = "$Q1+$Q2+$Q3"; echo $subtotal; all this does is print the values seperately withn the sign. Any ideas? Thanks again |
![]() |
|
| eXaulz | Feb 17 2005, 08:38 PM Post #2 |
|
GU˛ Services; Support Manager
![]() ![]() ![]() ![]()
|
Of course.. Do this:
(You don't do math around quotes, my friend.) |
![]() |
|
| SkItZo | Feb 17 2005, 09:46 PM Post #3 |
|
Support Volunteer
![]() ![]() ![]() ![]() ![]()
|
If you also want a fly-by tutorial on arithmethic operators for PHP, then visit this link http://chandan.tx.com.ru/tutorials/phptuts/tut2.html |
![]() |
|
| mathiaus | Feb 18 2005, 06:36 AM Post #4 |
|
mathiaus maximus™
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Thank you!! eXaulz > I never thought of spaces or removing the quotes SKITZo > I have seen pages about difefrent operators but they didnt use variables and I got confused. Thanks both of you Matt |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
3:45 PM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)



3:45 PM Jul 11