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 Quote 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>"; ?> Quote 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 Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/157099-solved-data-change/#findComment-827617 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.