2011-08-15, 06:06 AM
Hi!
I know I posted this on the MyCode request thread, but I thought a thread by itself would get me more help, since actual support would read it. Sorry if this is against the rules.
I would like to know if it's possible to make a MyCode that displays what a PHP function returns.
I managed to add a PHP function to the code (in global.php) that returns a string.
But what I would like is that a certain code displays it.
For example, if this function existed:
Shows:
EDIT: by the way, the returned value by the function has HTML tags in it, which should be dealt with apropriately (ie. <b>Hi</b> should appear as Hi).
Can this be done? Thanks!
I know I posted this on the MyCode request thread, but I thought a thread by itself would get me more help, since actual support would read it. Sorry if this is against the rules.
I would like to know if it's possible to make a MyCode that displays what a PHP function returns.
I managed to add a PHP function to the code (in global.php) that returns a string.
But what I would like is that a certain code displays it.
For example, if this function existed:
function foobar($text) {return "This is some text:" . $text; }
then I would like to have some code like this:[foobar_text]123456[/foobar_text]
Shows:
This is some text: 123456
EDIT: by the way, the returned value by the function has HTML tags in it, which should be dealt with apropriately (ie. <b>Hi</b> should appear as Hi).
Can this be done? Thanks!