PHP General Functions

Handling JSON with PHP - json_encode() and

JSON stands for JavaScript Object Notation. It is easily readable and writable by a wide range of scripting languages. It is a very simple, lightweight format, which can represent nested, structured data.

Read More

How To Make HTTP Requests in PHP - curl() Function
How To Make HTTP Requests in PHP - curl() Function

The cURL means client URL. It allows you to connect with other URLs and use their responses in your code. You can use Curl to make all kinds of HTTP requests, including sending custom headers, sending body data, and using different verbs to make your request. 

Read More

Random Functions in PHP
Random Functions in PHP

Random values are very important in many situations. Random values can be used to generate strings for passwords, quotes, and CAPTCHAs. They can also be used for grabbing random numbers for games and other purposes.

Read More

How To Output HTML Tags in PHP - htmlspecialchars() Function
How To Output HTML Tags in PHP - htmlspecialchars() Function

If you need to display some HTML code on the browser, first you need to convert it into HTML entities. Otherwise, the code will be processed by the PHP. For example, instead of <bold> output, the text itself will become bold.

Read More

How To Filter Variable in PHP - filter_var() Function
How To Filter Variable in PHP - filter_var() Function

The filter_var() function filters a variable with the specified filter. There are two types of filters:

  1. Validate filters
  2. Sanitize filters

Read More