Welcome Guest, Not a member yet? Register   Sign In
How to use public variables from controller in views in CI 4
#14

(This post was last modified: 12-30-2020, 07:26 AM by John_Betong.)

@ciaddict
> I didn’t understand...

Do you know how to use the Base_Controller?

In the Base_Controller index method define(‘MY_CONSTANT’, ‘with an array, string, integer, bool or object’);

To show in the view:

<?= MY_CONSTANT ?>
Reply


Messages In This Thread
RE: How to use public variables from controller in views in CI 4 - by John_Betong - 12-30-2020, 07:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB