PHP face questions and answers, PHP questions and Answers
1. Write a function to perform the following functions:
The string "Open_door" is converted to "Opendoor", "make_by_id" to "Makebyid".
function Str_change ($STR) {
$str = Str_replace ("_", "", $str);
$str = Ucwords ($STR);
$str = Str_replace ("", "" ", $str);
return $str; }
2. Required to write a program that implements the following array $arr1 conversions to the arrays $ARR2:
$arr 1 = array (' fid ' = = 1, ' tid ' = + 1, ' name ' = ' Nam ') E1 '),
' 1 ' = = Array (' fid ' = = 1, ' ti ' = + 2, ' name ' = ' Name2 '),
' 2 ' = = Array (' FID ' = 1, ' Tid ' =& Gt 5, ' name ' = ' Name3 '),
' 3 ' = = Array (' FID ' = 1, ' tid ' = + 7, ' name ' = ' Name4 '),
' 4 ' = = Array (' FID ' = 3, ' tid ' = 9, ' name ' = ' Name5 ')
);
$arr 2 = array (
' 0 ' = = Array (' tid ' = + 1, ' name ' = ' Name1 '),
' 1 ' = = Array (' Tid ' = 2, ' name ' = ' Name2 '),
' 2 ' = = Array (' tid ' = 5, ' name ' = ' Name3 '),
' 3 ' = = Array (' Tid ' = 7, ' name ' = ' Name4 '),
' 1 ' = = Array (
' 0 ' = = Array (' tid ' = + 9, ' name ' = = ' name5′));
!--? php
$arr 1 = array (
' 0 ' = = Array (' FID ' = 1, ' tid ' = = ', ' name ' = ' Name1 '),
' 1 ' = ' Rray (' fid ' = 1, ' tid ' = + 2, ' name ' = ' Name2 '),
' 2 ' = = Array (' FID ' = 1, ' tid ' = + 5, ' name ' = = ' Name3 '),
' 3 ' = = Array (' fid ' = = 1, ' tid ' = + 7, ' name ' = ' Name4 '),
' 4 ' = = Array (' FID ' = 3, ' Tid ' = 9, ' name ' = ' Name5 ')
);
Function Changearraystyle ($arr) {
foreach ($arr as $key = = $value) {
$result [$value [\fid\]][]= $value;
}
return Array_values ($result);
}
$arr 2=changearraystyle ($arr 1);
echo "
Var_dump ($arr 2);
?
3. Please briefly describe the paradigm and application of database design. The
General 3rd paradigm is sufficient for table structure optimization, which avoids the complexity of the application and avoids the system inefficiency caused by the SQL statement being too large.
ANSWER:
The first paradigm: if each of the properties of the relational pattern R is non-decomposed, then it belongs to the first paradigm.
Second Normal form: if R belongs to the first paradigm, and all non-code attributes are fully functional dependent on the code attribute, then the second paradigm.
Third Normal form: if R belongs to the second paradigm, and none of the non-code attributes is a transfer function dependent on the candidate code, then it belongs to the third paradigm.
http://www.bkjia.com/phpjc/1048767.html www.bkjia.com true Span id= "Isbasedonurl" itemprop= "Isbasedonurl" >http://www.bkjia.com/phpjc/1048767.html techarticle php face questions and answers, PHP questions and Answers 1. Write a function, The following functions are implemented: the string "Open_door" is converted to "Opendoor", "make_by_id" to "Makebyid". function Str_ ...