[memb_php]

This Applies to

Summary

This shortcode enables you to run native PHP code in your content, and output the results to the browser.

Shortcode Examples

[memb_php]
echo "Hello, World!";
[/memb_php]

This shortcode enables you to run native PHP code in your content, and output the results to the browser.

The code must not be wrapped in opening and closing PHP tags, such as ‘<?php echo “Hello, World”; ?>’. It is still possible to leave and re-enter PHP mode though using the appropriate PHP tags, e.g. ‘echo “In PHP mode!”; ?>In HTML mode!<?php echo “Back in PHP mode!”;’.

The code must be valid PHP. This includes that all statements must be properly terminated using a semicolon.

A return statement will immediately terminate the evaluation of the code.

Any variables defined or changed in the shortcode will remain visible after it completes.

Caution
This shortcode uses the eval() function to perform this operation. The eval() function is very dangerous because it allows execution of arbitrary PHP code. Its use is discouraged. If you have carefully verified that there is no other option than to use this code, pay special attention not to pass any user provided data into it without properly validating it beforehand.Your webhost may have disabled this function, and if that is the case, then the shortcode will not work.

Shortcode Attributes

capture:  Capture the output of the shortcode and route it to a variable for later use. (?)

txtfmt: A comma separated list of text processing functions to be used to post process the contact fields. (?)

  • Was this Helpful?
  • YesNo
9 ways to add more value to your membership site

[memb_php]

This Applies To

Book a Call

Welcome to Memberium!

We are very excited for you to be part of our family. 

We would love to answer any questions that you have!

Please choose the best time for you to get in a call with us. 

For Technical Support, you can contact us at https://keap.memberium.com/support/ or Email us at support@memberium.com.