FORUMS: list search recent posts

Simple php math question

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Bryan MyhrSimple php math question
by on May 13, 2011 at 4:53:44 am

I've got a e-commerce plugin that returns the product price with "
echo wpsc_the_product_price()" So I want to do some math to display a final price after mounting. This is what I have tried.

<?php $price = wpsc_the_product_price();
$mount = 19.75;
echo $price + $mount;

As I am not fluent in php, this does not work. How do I call up that price into the math?

Return to posts index

Bryan MyhrSOLVED: Simple php math question
by on May 13, 2011 at 6:18:46 am

Ok, I figured out that there was an extra space showing up and this fixed it, just in case anybody else runs into this.

$price = substr(wpsc_the_product_price(),2);

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved