Ok, I found that if I put the first section there is regular php tags and declare it global in the mfunc tag this will work.
.
Still can't get it to do what I want to on my actual pages though.
I don't understand why there isn't a really good tutorial on how to use mfunc/mclude with examples of how it is used in scripts - it's such a critical part of this and there's practically no documentation on how to use it..... or am I overlooking something somewhere?
Chris