Home Forums General Issues Execute PHP In Text Field? Reply To: Execute PHP In Text Field?

  • Hi @john.marcello

    PHP has a function called eval which you can use to run PHP functionality from a string:

    So you could run it like this:

    eval( get_field('field_name') );

    The only problem you will have is that your ‘string’ is not PHP, it is HTML with some PHP in it. I’m not sure if the eval function will recognize opening and closing PHP tags.

    This is something that Google will know more about than me.

    Good luck