Interview :: PHP
For, while, do-while and for each.
The PHP count() function is used to count total elements in the array, or something an object.
The header() function is used to send a raw HTTP header to a client. It must be called before sending the actual output. For example, you can't print any HTML element before using this function.
The isset() function checks if the variable is defined and not null.
PHP parameterized functions are functions with parameters. You can pass any number of parameters inside a function. These given parameters act as variables inside your function. They are specified inside the parentheses, after the function name. Output depends upon dynamic values passed as parameters into the function.
PHP supports variable length argument function. It means you can pass 0, 1 or n number of arguments.
There are three types of array in PHP:
- Indexed array: an array with a numeric key.
- Associative array: an array where each key has its specific value.
- Multidimensional array: an array containing one or more arrays within itself.