Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #955797

    Hi,

    I wrote a little php script for a website.
    I want to let it show in the header phone info.
    But when I insert it it doesn’t get converted to the echo’s I said (it shows the complete php code). How can I solve this?

    This is my php code:

    <?php
    $datum = date(‘M d Y’);

    switch ($datum) {
    case “May 30 2018”:
    echo ‘Same answer’;
    break;
    case “May 21 2018”:
    echo ‘Same answer’;
    break;
    case “Jun 10 2019”:
    echo ‘Same answer’;
    break;
    case “Aug 8 2018”:
    echo ‘Same answer’;
    break;
    case “Dec 25 2018”:
    echo ‘Same answer’;
    break;
    case “Dec 26 2018”:
    echo ‘Same answer’;
    break;
    default:
    echo ‘Other answer’;
    }
    ?>

    #955852

    Hey (Email address hidden if logged out) ,
    Please try creating a shortcode for your script, here’s a Shortcodes Generator

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.