j0s Posted August 29, 2005 Share Posted August 29, 2005 Hi everyone, I have no idea on how to format the output from $imperial to get a result like this : Hight: 91 cm - ( 35.83 po ) instead : Hight: 91 cm - ( 35.826771653543 po ) Thanks ----------------------------------------------------------- the peace of code ----------------------------------------------------------- while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { echo ' '.$extra_fields['name'].': '; echo $extra_fields['value'].' cm - <i>( '; $imperial = ($extra_fields['value']*0.3937007874015748031496062992126); echo $imperial. ' po )</i><br><img src=images/sep.png border=0 width=140 height=1><br><font size=-3></font>'; } ----------------------------------------------------------- X Link to comment Share on other sites More sharing options...
j0s Posted August 30, 2005 Author Share Posted August 30, 2005 :D Ok that's was a stupid question ! But in case, maybe this could be helping... the solution was to let only 2 digit $imperial = ($extra_fields['value']*0.39); Hi everyone, I have no idea on how to format the output from $imperial to get a result like this : Hight: 91 cm - ( 35.83 po ) and not Height: 91 cm - ( 35.826771653543 po ) Thanks ----------------------------------------------------------- the peace of code ----------------------------------------------------------- while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { echo ' '.$extra_fields['name'].': '; echo $extra_fields['value'].' cm - <i>( '; $imperial = ($extra_fields['value']*0.3937007874015748031496062992126); echo $imperial. ' po )</i><br><img src=images/sep.png border=0 width=140 height=1><br><font size=-3></font>'; } ----------------------------------------------------------- <{POST_SNAPBACK}> X Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.