Welcome Guest, Not a member yet? Register   Sign In
Config class the best use of
#1

[eluser]我是一名刀客[/eluser]
I'm doing a project dating marriage

Data entry when:
Code:
<select>
     <option values ​​= "1"> School </ option>
     <option values ​​= "2"> degree </ option>
     <option values ​​= "3"> Master </ option>
     <option values ​​= "4"> Dr. </ option>
</ select>

So

Information stored in the database table is: 1,2,3,4 ..

Page is displayed, the need to convert, I now do:

Built in the config folder xxx.php, which wrote:
Code:
$config ['userdata']=
{
    ' education' => array (1 => 'school'), 2 => 'Degree', 3 => 'Master', 4 => 'Dr.'
}

In views where:

Code:
$userdata ['education'] [$row->education]    //Where {$row->educaion} is the value read from the database


Please help me identify my friends

thanks, all


Messages In This Thread
Config class the best use of - by El Forum - 07-22-2011, 02:11 AM
Config class the best use of - by El Forum - 07-22-2011, 02:43 AM
Config class the best use of - by El Forum - 07-22-2011, 03:02 AM
Config class the best use of - by El Forum - 07-22-2011, 03:10 AM
Config class the best use of - by El Forum - 07-22-2011, 03:12 AM
Config class the best use of - by El Forum - 07-22-2011, 04:01 AM
Config class the best use of - by El Forum - 07-22-2011, 08:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB