Skip to content

Latest commit

 

History

History
70 lines (64 loc) · 3.63 KB

n4ba.md

File metadata and controls

70 lines (64 loc) · 3.63 KB

Stars Badge Forks Badge Pull Requests Badge Issues Badge GitHub contributors Visitors

Don't forget to hit the ⭐ if you like this repo.

PHP: Fundamentals

Set B

  1. a) <?php
  2. a) echo "Hello, World!";
  3. a) $my_var
  4. a) Using the . operator.
  5. a) 15
  6. a) // Comment
  7. a) define("MY_CONSTANT", 100);
  8. a) include "file.php";
  9. b) Data sent through a POST request.
  10. a) file_exists("file.txt")
  11. a) To calculate the length of a string.
  12. a) Greater than 5
  13. a) function myFunction() {}
  14. a) To terminate the execution of the function and return a value.
  15. a) myFunction();
  16. a) To loop through each element in an array or object.
  17. a) 12345
  18. a) To skip the current iteration of the loop and continue to the next iteration.
  19. a) To exit the loop completely.
  20. a) Data sent through a GET request.
  21. a) header("Location: newpage.php");
  22. a) To store session variables.
  23. a) session_destroy();
  24. a) To include an external PHP file only once.
  25. a) To include an external PHP file.
  26. a) To check if a value is a number or a numeric string.
  27. a) To replace occurrences of a substring with another substring in a string.
  28. a) To format the current date and time.
  29. a) To count the number of elements in an array.
  30. a) To add one or more elements to the end of an array.
  31. a) fopen("file.txt", "r");
  32. a) To check if the end of a file has been reached.
  33. a) To read the contents of a file into a string.
  34. a) To write data to a file.
  35. a) To delete a file.
  36. a) To establish a connection to a MySQL database.
  37. a) To execute a SQL query.
  38. a) To fetch a row from a database result as an associative array.
  39. a) To get the number of rows in a database result.
  40. a) To close a database connection.
  41. a) To convert special characters to HTML entities.
  42. a) To validate and filter data.
  43. a) To retrieve external variables and filter them.
  44. a) To hash a password using a specified algorithm.
  45. a) To validate a password against a hashed value.
  46. a) To start a new session or resume an existing session.
  47. a) To retrieve cookie values.
  48. a) To set a cookie.
  49. a) To access server information.
  50. a) To retrieve form data submitted with the POST method.

Contribution 🛠️

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.

Visitors