How to create comma separated list from an array in PHP ?
The comma separated list can be created by using implode() function. The implode() is a builtin function in PHP and is used to join the elements of an array. implode() is an alias for PHP | join() function and works exactly same as that of join() function. If we have an array of elements, we can use the implode() function to join them all to form one string. We basically join array elements with a string. Just like join() function , implode() function also returns a string formed from the elements of an array....
read more
How to read and write Excel file in Node.js ?
Node.js is an open-source and cross-platform JavaScript runtime environment that can also be used to read from a file and write to a file which can be in txt, ods, xlsx, docx, etc format....
read more
How to create admin login page using PHP?
In this article, we will see how we can create a login page for admin, connected with the database, or whose information to log in to the page is already stored in our database....
read more
Multidimensional arrays in PHP
Multi-dimensional arrays are such type of arrays which stores an another array at each index instead of single element. In other words, define multi-dimensional arrays as array of arrays. As the name suggests, every element in this array can be an array and they can also hold other sub-arrays within. Arrays or sub-arrays in multidimensional arrays can be accessed using multiple dimensions....
read more
Java Servlet and JDBC Example | Insert data in MySQL
Prerequisites: Servlet, JDBC Connectivity...
read more
How to encrypt and decrypt passwords using PHP ?
The best way to encrypt and decrypt passwords is to use a standard library in PHP because the method of properly encrypting and decrypting passwords from scratch is complex and involves multiple possibilities of security vulnerabilities. Using the standard library ensures that the hashing implementation is verified and trusted....
read more
PHP | check if a number is Even or Odd
A number is called even if the number is divisible by 2 and is called odd if it is not divisible by 2. Given a number, we need to check whether it is odd or even in PHP....
read more
PHP | Ternary Operator
If-else and Switch cases are used to evaluate conditions and decide the flow of a program. The ternary operator is a shortcut operator used for shortening the conditional statements....
read more
How to pass form variables from one page to other page in PHP ?
Form is an HTML element used to collect information from the user in a sequential and organized manner. This information can be sent to the back-end services if required by them, or it can also be stored in a database using DBMS like MySQL. Splitting a form into multiple steps or pages allow better data handling and layering of information. This can be achieved by creating browser sessions. HTML sessions are a collection of variables that can be used to maintain the state of the form attributes while the user switched between the pages of the current domain. Session entries will be deleted as soon as the user closes the browser or leaves the site....
read more
How to delete a file using PHP ?
To delete a file by using PHP is very easy. Deleting a file means completely erase a file from a directory so that the file is no longer exist. PHP has an unlink() function that allows to delete a file. The PHP unlink() function takes two parameters $filename and $context. Syntax:...
read more
How to Install php-curl in Ubuntu ?
CURL stands for Client URL. It is a Linux Terminal command which is used to transferring data from one server to another server. It is a free and open-source data transfer tool that uses the following protocols: IMAP, IMAPS, POP, POP3, POP3S, DICT, FILE HTTP, HTTPS, SMB, SMBS, SMTP, SMTPS, FTP, FTPS, TELNET, RTSP, RMTP, and TFTP....
read more
How to echo HTML in PHP ?
While making a web application with PHP, we often need to print or echo few results in form of HTML. We can do this task in many different ways. Some of methods are described here:...
read more