Welcome Guest, Not a member yet? Register   Sign In
Where to put odds & ends PHP functions?
#1

[eluser]Unknown[/eluser]
I'm using a pre-PHP 5.2 version of PHP and need json_encode. I have a replacement function in a PHP file, but need to know where this type of thing is meant to go to hook into my app.

I realize I could put it anywhere and include the file, but is there a specific location for these things to go?

Thanks in advance!
#2

[eluser]Phil Sturgeon[/eluser]
You can chuck that in a helper file, wrapped in a if(function_exists()) like the standard ones do.

Take a look at Helpers in the User Guide.
#3

[eluser]Unknown[/eluser]
Actually, I realized it falls more in the category of a plugin. Thanks for the reply!




Theme © iAndrew 2016 - Forum software by © MyBB