Welcome Guest, Not a member yet? Register   Sign In
where to put and how to call function

Hello Everyone!

I'm new to CodeIgniter (MVC) framework.

I just want to ask where do I put my function so that  can use it in every View. 
like for example I have function that convert  number in to another number, an i need to use it n another view.

the function is long and I don't want to copy it in every view


Create a helper function:
and load it before using it:

If you use it in every request, you can autoload the helper:

Thank you..

The placement and invocation of a function depend on the programming language and the specific context of your code. Typically, functions are defined at the beginning or within the scope where they will be used and called wherever their functionality is needed.GB whatsapp apk

Theme © iAndrew 2016 - Forum software by © MyBB