• Resolved damian0021

    (@damian0021)


    Hey,

    I have some problems with Shortcode and PHP:

    My code below:

    <?php
    $input = array("1","2","3");
    $rand_keys = array_rand($input, 2);
    echo $input[$rand_keys[0]];
    echo $input[$rand_keys[1]];
    ?>

    Of course, I have the option Shortcode and PHP – unfortunately nothing is displayed.

Viewing 1 replies (of 1 total)
  • Hi damian0021,

    did you also select “Shortcode” besides “PHP code”?

    Also you co’t have to add the PHP start and end tags <?php and ?>.

    Kind regards
    David

Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode and PHP’ is closed to new replies.