tailieunhanh - Tự học HTML và CSS trong 1 giờ - part 66

Tham khảo tài liệu 'tự học html và css trong 1 giờ - part 66', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 626 LESSON 21 Taking Advantage of the Server As you ll see a bit further on the ability to specify array indexes using variables is a staple of some kinds of loops in PHP. As you ve seen nothing distinguishes between a variable that s an array and a variable that holds a string or a number. PHP has a built-in function named is_array that returns true if its argument is an array and false if the argument is anything else. Here s an example is_array array 1 2 3 returns true is_array tree returns false To determine whether a particular index is used in an array you can use PHP s array_key_exists function. This function is often used to do a bit of checking before referring to a particular index for example if array_key_exists state_capitals Michigan echo state_capitals Michigan As mentioned previously it s perfectly acceptable to use arrays as the values in an array. Therefore the following is a valid array declaration stuff colors array red green blue numbers array one two three In this case I have an associative array that has two elements. The values for each of the elements are arrays themselves. I can access this data structure by stacking the references to the array indexes like this colors stuff colors Returns the list of colors. color stuff colors 1 Returns green number stuff numbers 0 Returns one Strings The most common data type you ll work with in PHP is the string type. A string is just a series of characters. An entire web page is a string as is a single letter. To define a string just place the characters in the string within quotation marks. Here are some examples of strings one 1 I like publishing Web pages. This string spans multiple lines. Download from The PHP Language 627 Take a look at the last string in the list. The opening quotation mark is on the first line and the closing quotation mark is on the second line. In PHP this is completely valid. In some programming languages strings that span multiple lines are illegal not so in

TÀI LIỆU MỚI ĐĂNG
1    124    1    19-05-2024
8    117    0    19-05-2024
11    108    0    19-05-2024
28    119    0    19-05-2024
442    98    0    19-05-2024
12    154    0    19-05-2024
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.