Code: Select all
$ounce_price = null;
$grams_price = null;
if(count($nodes) == 1 && $nodes[0][1]) {
$ounce_price = $nodes[0][1];
$grams_price = $ounce_price * 0.0321;I then tried the code:
Code: Select all
$ounce_price = null;
$grams_price = null;
if(count($nodes) == 1 && $nodes[0][1]) {
$ounce_price = $nodes[0][1];
$grams_price = $ounce_price + 1;I'm so confused as to why when adding an equation to $ounce_price the value reverts to '1' as opposed to equalling the correct number. Any help here would be HUGELY appreciated - I've been stuck for several days and only just decided to ask online :s
Nick