Created
October 9, 2017 11:17
-
-
Save rahuldadhich/aed964cd4f6b2c2f4bb1783d010d62e9 to your computer and use it in GitHub Desktop.
Global array in codeigniter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Codeigniter | |
// In application/config/constant.php | |
$usr_data = array(1 => "a", 2 => "b", 3 => "c"); | |
// In any view | |
global $usr_data; | |
echo $usr_data[2]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment