07-22-2011, 02:11 AM
[eluser]我是一名刀客[/eluser]
I'm doing a project dating marriage
Data entry when:
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:
In views where:
Please help me identify my friends
thanks, all
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