hey'; } ?> I would like to call this function in the marku" /> hey'; } ?> I would like to call this function in the marku" /> hey'; } ?> I would like to call this function in the marku"/>

OctoberCMS - calling PHP function wrriten in code segment in markup

124 views Asked by At

Say I have a function in the code segment called "foo"

<?php

    function foo(){
        echo '<h1>hey</h1>';
    }
?>

I would like to call this function in the markup segment, something like {{foo}}.

How can I do that? I have tried doing exactly what I wrote, but it shows no result - a blank screen.

0

There are 0 answers