Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Extra fields


j0s

Recommended Posts

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

: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>';

 

  }

-----------------------------------------------------------

X

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...