Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-18-2003, 09:42 PM   PM User | #1
SDP2006
Regular Coder

 
Join Date: May 2003
Location: 34° 54' N 82° 13' W
Posts: 996
Thanks: 0
Thanked 0 Times in 0 Posts
SDP2006 is an unknown quantity at this point
Mathematics and PHP

Any good tutorials on doing basic math in PHP?

i.e. 9*7, 8/68, 2+2, 4-2, etc. etc.

Thanks
__________________
Stevie Peele
Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
#dev - any programming,etc. question
#design - design discussion and critque
#central - general chat
Come join us!
SDP2006 is offline   Reply With Quote
Old 09-18-2003, 09:47 PM   PM User | #2
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
Just put it in a expression and execute it:

PHP Code:
print 7
Or did you have something different in mind?
__________________
De gustibus non est disputandum.
mordred is offline   Reply With Quote
Old 09-18-2003, 09:48 PM   PM User | #3
SDP2006
Regular Coder

 
Join Date: May 2003
Location: 34° 54' N 82° 13' W
Posts: 996
Thanks: 0
Thanked 0 Times in 0 Posts
SDP2006 is an unknown quantity at this point
Okay, sorry for posting, found it in the PHP Manual right after I posted.

Thanks mordred
__________________
Stevie Peele
Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
#dev - any programming,etc. question
#design - design discussion and critque
#central - general chat
Come join us!
SDP2006 is offline   Reply With Quote
Old 09-19-2003, 02:46 AM   PM User | #4
Acecool
New Coder

 
Join Date: Sep 2003
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Acecool is an unknown quantity at this point
<?php
$something = (89234 * 2382378 + 24 / 10);
echo $something;
?>
__________________
http://www.acecoolco.com/avs/Acecool..._Signature.php
If you plan on contacting me, please read this: Legal Terms & Conditions
Acecool is offline   Reply With Quote
Old 09-23-2003, 09:41 PM   PM User | #5
bored
New Coder

 
Join Date: Jan 2003
Location: Tulsa, OK
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
bored is an unknown quantity at this point
For continuity sake, try seperating your arguments for calculation.

Good for debugging as well.

PHP Code:
<?php
$something 
= ((89234 2382378) + (24 10));
echo 
$something;
?>
bored is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:29 AM.


Advertisement
Log in to turn off these ads.