21.) How we can retrieve the data in the result set of MySQL using PHP?
22.) What is the use of explode() function ?
Syntax : array explode ( string $delimiter , string $string [, int $limit ] );
This function breaks a string into an array. Each of the array elements is a substring of string formed by splitting it on boundaries formed by the string delimiter.
23.) What is the difference between explode() and split() functions?
Split function splits string into array by regular expression. Explode splits a string into array by string.
24.) What is the use of mysql_real_escape_string() function?
It is used to escapes special characters in a string for use in an SQL statement
25.) Write down the code for save an uploaded file in php.
if ($_FILES["file"]["error"] == 0)
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"upload/" . $_FILES["file"]["name"]);
echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
}
- mysql_fetch_row
- mysql_fetch_array
- mysql_fetch_object
- mysql_fetch_assoc
22.) What is the use of explode() function ?
Syntax : array explode ( string $delimiter , string $string [, int $limit ] );
This function breaks a string into an array. Each of the array elements is a substring of string formed by splitting it on boundaries formed by the string delimiter.
23.) What is the difference between explode() and split() functions?
Split function splits string into array by regular expression. Explode splits a string into array by string.
24.) What is the use of mysql_real_escape_string() function?
It is used to escapes special characters in a string for use in an SQL statement
25.) Write down the code for save an uploaded file in php.
if ($_FILES["file"]["error"] == 0)
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"upload/" . $_FILES["file"]["name"]);
echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
}