siclines Posted May 6, 2009 Share Posted May 6, 2009 So I have a table with data in it, but I want to change the value by multiplying it. So here is the code showing the data in the table: echo "<td width='100' align='center'>" . $row[value* 3.2] . "</td>"; The value is 1.1 and the output from the code above is 837 when it should be 3.52, what am I doing wrong? Thanks for your help Link to comment https://forums.phpfreaks.com/topic/157099-solved-data-change/ Share on other sites More sharing options...
Zhadus Posted May 6, 2009 Share Posted May 6, 2009 <?php echo "<td width='100' align='center'>" . ($row[value] * 3.2). "</td>"; ?> Link to comment https://forums.phpfreaks.com/topic/157099-solved-data-change/#findComment-827605 Share on other sites More sharing options...
siclines Posted May 6, 2009 Author Share Posted May 6, 2009 thanks, i tried that before, but I put the ( before value, not row. Thanks again Link to comment https://forums.phpfreaks.com/topic/157099-solved-data-change/#findComment-827608 Share on other sites More sharing options...
Zhadus Posted May 6, 2009 Share Posted May 6, 2009 No problem, if it works good make sure to mark the topic solved at the bottom of the posts screen. Link to comment https://forums.phpfreaks.com/topic/157099-solved-data-change/#findComment-827617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.