I want to do this:
function square ($a){ print "-- $a --"; }
And use it like this:
<? square( ?> Hello! <? ) ?>
And get this:
-- Hello! --
But of course it doesn't work, so I have to do this:
function square1 { print "-- "; }
function square2 { print " --"; }
And us it like this:
<? square1() ?> Hello! <? square2() ?>
Which isn't as clean... Is there a way to solve it like I want to do it?
If you hadn't understood it yet, it's for making a frame around blocks
of text.
function square ($a){ print "-- $a --"; }
And use it like this:
<? square( ?> Hello! <? ) ?>
And get this:
-- Hello! --
But of course it doesn't work, so I have to do this:
function square1 { print "-- "; }
function square2 { print " --"; }
And us it like this:
<? square1() ?> Hello! <? square2() ?>
Which isn't as clean... Is there a way to solve it like I want to do it?
If you hadn't understood it yet, it's for making a frame around blocks
of text.
Comment