Don't forget to hit the ⭐ if you like this repo.
- a)
<?php
- c) PHP: Hypertext Preprocessor
- a)
echo
- a) Using the assignment operator (
=
) - a) With a semicolon (
;
) - a)
.
- a)
//
- a)
strlen()
- a) 15
- a)
$fruits = array("Apple", "Banana", "Orange");
- a) By using square brackets
[]
and the index number - b) Odd
- a)
include()
- a)
define("PI", 3.14);
- a)
session_start()
- a)
$_GET["param"]
- d)
$_COOKIE
- a)
header("Location: newpage.php");
- b) 510
- a)
mysqli_connect()
- a) To prevent SQL injection attacks
- a)
mysqli_num_rows()
- a)
mysqli_close()
- a) It's a fruit.
- a) Using
try...catch
blocks - c) To initialize the object's properties and perform setup tasks
- a)
$object = new ClassName();
- a) Hello, John
- a) By using the
::
operator - a) It allows access to the property or method from anywhere
- c) 15
- c) Using the
fgets()
function - a) To check if a file or directory exists
- a) 5
- a)
trim()
- b) 11
- a) To iterate over elements in an array or collection
- a)
empty()
- b) Hello PHP
- d) To add elements to the end of an array
- b) 15
- a) To split a string into an array
- b) 9
- b) To format a date and time string
- a) Adult
- a) To set HTTP headers for the response
- a) 5
- a) To convert a PHP array or object into a JSON string
- a) Color found!
- a) To filter and sanitize user input data
Please create an Issue for any improvements, suggestions or errors in the content.
You can also contact me using Linkedin for any other queries or feedback.