[syntax=php]echo '<td align="center" width="20"><p class="credit" maxlength="4" >'.$row['profit'].'$</p></td>'; [/syntax]
With this i got a profit number like this 343.34.
I want to display only 343 and .34 to be hidden, how can i do that? Hidden from the main page, not in the phpmyadmin table.
And yes one more thing, here i dont know how to show numbers within the design.
It shows when i do with this
[syntax=php]$profit = $row['profit'] ;
$ulog = $row['ulog'] ;
echo $row['profit'] * $row['ulog'];[/syntax]
but not with this
[syntax=php]if($row['status']==1)echo '<td align="center"<td height="21"><font size="2" style=color:limegreen>+'.$row['profit'].'$</td>';
[/syntax] http://prntscr.com/7huy7q
1. well i need to fit in that round in here but i dont know how because i alwas get some error.
echo '<td align="center" width="20"><p class="credit" maxlength="4" >'.$row ['profit'].'$</p></td>';
2. here is the whole code, last 3 rows are correct and i want to show that result inhere
You want to use round() on the profit
[syntax=php]round($row['profit'])[/syntax]
if that doesn't work can you post the code that you tried and the error it gave?
In one example you multiply profit by ulog and in the other you don't. Could that be something to do with it?
It might help to print out the variables and see if they have the values you expect. You can use var_dump to show the value in detail, have a look at http://php.net/var_dump