Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to multiply


lucilue2003

Recommended Posts

$PercentageBrowsers = str_replace("%","",$PercentageBrowsers);

$BuyersPercentage = str_replace("%","",$BuyersPercentage);

$dollaramount = str_replace("$","",$dollaramount);

 

 

echo "

<b>$Visitors</b><br><br>

<b>$PercentageBrowsers</b><br><br>

<b>$BuyersPercentage </b><br><br>

<b>$dollaramount </b><br><br>

" ;

 

/*

$Browsers = $Visitors * $PercentageBrowsers;

$Buyers = $BuyersPercentage * $Browsers

$profit = $dollaramount * $Buyers;

*/

 

The above results in :

8000000

 

.05

 

.05

 

1.00

 

however, when i uncomment the above, i get the following response:

 

 

Parse error: parse error, unexpected T_VARIABLE in C:\indigoperl\apache\htdocs\bplan\showresults.php on line 26

 

 

thanks you.

Link to comment
Share on other sites

When debugging code, it is often handy to do it line by line.

So a natural suggestion would be ok lets see what happens when I only uncomment the first line. If that works then move on to the next.

 

In either case the error msg, in this case, tells you exactly which line the error is occuring.

 

If you look closely you will see that there is no ';' at the end of that particular line.

 

:)

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...