Multiplying

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rdx321
Forum Newbie
Posts: 1
Joined: Tue Apr 01, 2008 8:53 pm

Multiplying

Post by rdx321 »

Hey guys, I need some help multiplying some numbers.

What I want to do is multiple 5 x $A$B so if $A=50 and $B=1 php would multiply 5x501

This is the code that I am currently using but is not working.
<?php

$A = 1;
$B = 2;
$C = 4;
$D = 2;
$Day = 1;
$Month = 4;
$Year = 8;
$pin = '$B, $A';

$DayTotal = $Day + $Month + $Year;

$tin = 5 * $A,$B ;

print ($tin);

?>
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Multiplying

Post by Christopher »

Code: Select all

$c = intval("$A$B");
(#10850)
Post Reply