Easy PHP Math question

They have: 218 posts

Joined: Apr 2001

After a database query, I want to calculate and echo two math values from two fields from the query: 'wid' and 'heig' (both int(11))

foreach ($curObj as $key=>$val) {
$output .= "&$key=$val";
}

$val=2.6;

// $wid and $heig need to be returned //from database query

$wNum = $wid/$val;
$hNum = $heig/$val;

// something's not right...
$output .= "&wNum=$wid";
$output .= "&hNum=$heig";

echo $output;

How can I fix that?

Cheers,

TonyMontana