Codeignitor Global Array Declaration
Posted
by Ajith
on Stack Overflow
See other posts from Stack Overflow
or by Ajith
Published on 2010-05-25T12:01:29Z
Indexed on
2010/05/25
13:41 UTC
Read the original article
Hit count: 169
php
|codeigniter
I have a sequence of number like follows
1 -> 25, 2 -> 60, 3 -> 80, 4 -> 100 and so on
which means that if input is 1 output will be 25 and so on...I need to store it in global array.I would like to use it in multiple pages also.In codeigniter where i can declare a global array and store all these?
I am trying like as follows in constants.php
$CONFIDENCEVALUE = array();
$CONFIDENCEVALUE[] = array('1'=>25,'2'=>'60','3'=>80,'4'=>100);
If it is correct how can access these array value in required pages.Help me please.I am not an expert with codeignitor.Thanks
© Stack Overflow or respective owner