Support » Everything else WordPress » Math and Custom Fields

  • I am using the following code to create a variable that references a custom ID:

    <? $prodid = get_post_meta($post->ID, 'product-id', true) ?>

    Later on, I want to use the same custom field, but multiply it by 2. Is this possible with PHP? I am thinking something ike this:

    <?php $prodid*2 ?>

    I know this is far from correct, however, I know it is something simple; I just don’t know enough PHP to figure it out!

    Thanks so much!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Math and Custom Fields’ is closed to new replies.