Hello all,
I wonder if anyone might have an answer to this . . .
I’m writing some code which has blocks which are repeated hundreds of times, The user (i.e.me) manually enters ‘tags’ in the program code. To make things clearer and easier to use, I’ve ‘split’ the PHP code so that it’s super easy to enter the tags in notepad.
Everything works fine . . . but . . .
I’d like to be able to ‘call’ some bits of the code (as it’s used so many times) but I can’t use eval() because the code has been split andso is PHP invalid. May thatnks for any ideas!
This code should make clear what I’m tryning to say
<?php
// beginning of very often repeated code block . . .
// this is the first (invalid PHP) line I need to be able to repeatedly call
$quite_long_and_very_often_repeated_string="
apple orange banana
";echo($quite_long_and_very_often_repeated_string);
// this is the second (invalid PHP) line I need to be able to repeatedly call
// end of block
?>