Support

Account

Home › Forums › General Issues › How to convert a text value from a field to a numerical value within a Variable? › Reply To: How to convert a text value from a field to a numerical value within a Variable?

  • Hi @lee-harvey

    I am not sure that I have fully understood the description, is this what you are after?

    <?php if (get_field('q1_answer') == 'Yes') {
              $value = "1";
            } ?>