Cross Snippet Functions
-
I’ve been trying to create a utility php script that holds functions that I use often. It seems I can’t call functions from one snippet in another snippet.
For example this snippet
[xyz-ips snippet="Utils"]<?php function writeMsg() { echo "Hello world!"; } ?>cannot be called by this snippet
[xyz-ips snippet="UtilCaller"]<?php writeMsg(); ?>Edit:
Been looking through the support section of the forums and came across this post.In the post you mention using global variables with
$GLOBALS[‘your_variable’]=”something”;Is there a similar methodology for functions?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Cross Snippet Functions’ is closed to new replies.