31) What does the unset() function mean?
The unset() function is dedicated for variable management. It will make a variable undefined.
32) What does the unlink() function mean?
The unlink() function is dedicated for file system handling. It simply deletes the file given as entry.
33) How do I check if a given variable is empty?
If we want to check whether a variable has a value or not, it is possible to use the empty() function.
34) How can we check the value of a given variable is alphanumeric?
It is possible to use the dedicated function, ctype_alnum to check whether it is an alphanumeric value or not.
35) How can we check the value of a given variable is a number?
It is possible to use the dedicated function, is_numeric() to check whether it is a number or not.
36) How can we access the data sent through the URL with the GET method?
To access the data sent via the GET method, we use $_GET array like this:www.url.com?var=value
$variable = $_GET["var"]; this will now contain 'value'
37) How can we access the data sent through the URL with the POST method?
To access the data sent this way, you use the $_POST array.
Imagine you have a form field called 'var' on the form when the user clicks submit to the post form, you can then access the value like this:
$_POST["var"];
38) How is it possible to know the number of rows returned in the result set?
The function mysqli_num_rows() returns the number of rows in a result set.
39) Which function gives us the number of affected entries by a query?
mysqli_affected_rows() return the number of entries affected by an SQL query.
40) What is the difference between mysqli_fetch_object() and mysqli_fetch_array()?
The mysqli_fetch_object() function collects the first single matching record where mysqli_fetch_array() collects all matching records from the table in an array.
No comments:
Post a Comment