tailieunhanh - PHP Developer's Dictionary- P6
PHP Developer's Dictionary- P6:PHP is an open source, server-side, HTML-embedded scripting language used to create dynamically generated Web pages. With an easy-to-use syntax and a large, extensible library of modules, PHP brings together the best of Perl, C++, and other languages. | PHP Developer s Dictionary Greater than Greater than or equal to Less than Less than or equal to In the PHP language logical operators include the typical and or xor and not operators. The syntax of these operators is detailed in Table . Table . Logical Operators Operator Description II Or or Or xor Xor And and And Not When an equation is evaluated the entire expression is considered to determine operator precedence. This precedence determines the order in which the operators are executed. Table details PHP s operator precedence. Table . Operator Precedence Operators -- Highest Precedence - II - and xor or Lowest Precedence Remember that parentheses can be used to arrange expressions into groups to circumvent the operator precedence. It is always a good idea to use parentheses to be sure that the expression is properly evaluated. Control Structures Control structures determine the way that code is executed and the decisions that are made depending on variables. These control structures enable you to reuse code evaluate expressions and determine the code path. This control comes in the form of four basic statements if statements switch statements while loops and for loops. The if statement has three different constructs. The first is the basic if statement which evaluates the expression and then executes the code in the braces if the expression is true. The pseudo code looks like this IT-SC book 25 PHP Developer s Dictionary if expression This code is executed if the expression evaluates to true The second way of working with the if statement is to provide an alternative if the expression doesn t resolve to true. This is known as the if-eise statement and the pseudo code looks like this if expression This code is executed if the expression evaluates to true else This code is executed if the expression evaluates to false The last type of if statement is known as the if-elseif statement. This statement evaluates multiple expressions and executes the .
đang nạp các trang xem trước