How to Encrypt and Decrypt a PHP String ?
In PHP, Encryption and Decryption of a string is possible using one of the Cryptography Extensions called OpenSSL function for encrypt and decrypt. openssl_encrypt() Function: The openssl_encrypt() function is used to encrypt the data. Syntax:...
read more
How to get parameters from a URL string in PHP?
The parameters from a URL string can be retrieved in PHP using parse_url() and parse_str() functions....
read more
How to run JavaScript from PHP?
JavaScript is the client side scripting language and PHP is the server side scripting language. JavaScript is used as client side to check and verify client details and PHP is server side used to interact with database. In PHP, HTML is used as a string in the code. In order to render it to the browser, we produce JavaScript code as a string in the PHP code....
read more
How to pass JavaScript variables to PHP ?
JavaScript is the client side and PHP is the server-side script language. The way to pass a JavaScript variable to PHP is through a request....
read more
Best way to initialize empty array in PHP
Arrays in PHP: Use array() Function to create an array in PHP. There are three types of array supported in PHP:...
read more
How to make div height expand with its content using CSS ?
To make a div’s height adapt to its content using CSS, use `height: auto;` or skip setting a fixed height. This ensures the div adjusts dynamically to different content sizes, promoting a flexible layout. Avoid conflicting styles that might restrict the height, allowing you to create a responsive design that seamlessly accommodates diverse content within the div....
read more
Split a comma delimited string into an array in PHP
Given a long string separated with comma delimiter. The task is to split the given string with comma delimiter and store the result in an array....
read more
How to declare a global variable in PHP?
Global variables refer to any variable that is defined outside of the function. Global variables can be accessed from any part of the script i.e. inside and outside of the function. So, a global variable can be declared just like other variable but it must be declared outside of function definition....
read more
Python | Build a REST API using Flask
Prerequisite: Introduction to Rest API...
read more
How to make a div fill a remaining horizontal space using CSS?
The width property in CSS is a versatile feature used to occupy a div’s remaining horizontal space. By setting the width to 100%, it adapts to fill the entire width of its parent element, providing a responsive design solution....
read more
Introduction to Spring Boot
Spring is widely used for creating scalable applications. For web applications Spring provides Spring MVC which is a widely used module of spring which is used to create scalable web applications. But main...
read more
How to fetch data from localserver database and display on HTML table using PHP ?
In this article, we will see how we can display the records in an HTML table by fetching them from the MySQL database using PHP....
read more