A cookie in PHP is a small file with a maximum size of 4KB that the web server stores on the client computer. They are typically used to keep track of information such as a username that the site can retrieve to personalize the page when the user visits the website next time. A cookie can only be read from the domain that it has been issued from. Cookies are usually set in an HTTP header but JavaScript can also set a cookie directly on a browser....
To convert an array into a CSV file we can use fputcsv() function. The fputcsv() function is used to format a line as CSV (comma separated values) file and writes it to an open file. The file which has to be read and the fields are sent as parameters to the fputcsv() function and it returns the length of the written string on success or FALSE on failure....
This article is aimed at giving a PHP implementation for pattern printing....
The task is to create and design a sign-up form in which if the user enters details, the HTML form data are inserted into our MySQL server database....
The base64_encode() function is an inbuilt function in PHP which is used to convert any data to base64 encoding. In order to convert an image into base64 encoding firstly need to get the contents of file. This can be done with the help of file_get_contents() function of PHP. Then pass this raw data to base64_encode() function to encode....
The gettype() function is an inbuilt function in PHP which is used to get the type of a variable. It is used to check the type of existing variable....
Arrays in PHP are a type of data structure that allows us to store multiple elements of similar or different data types under a single variable thereby saving us the effort of creating a different variable for every data. The arrays are helpful to create a list of elements of similar types, which can be accessed using their index or key....
New Line helps the page to look better and presentable. We will learn to insert a new line in PHP using 2 ways....
Passing PHP Arrays to JavaScript is very easy by using JavaScript Object Notation(JSON)....
Given a form and the task is to check form submitted successfully or not. Use the PHP program for the backend to check form submission and HTML and CSS to create the form as frontend....
Adding days to $Date can be done in many ways. It is very easy to do by using built-in functions like strtotime(), date_add() in PHP.Method 1: Using strtotime() Function: The strtotime() Function is used to convert an English textual date-time description to a UNIX timestamp. Syntax:...
In PHP, multidimensional array search refers to searching a value in a multilevel nested array. There are various techniques to carry out this type of search, such as iterating over nested arrays, recursive approaches and inbuilt array search functions....