Month: March 2021

loops

PHP Loops Often when you write code, you want the same block of code to run over and over again a certain number of times. So, instead of adding several almost equal code-lines in a script, we can use loops. Loops are used to execute the same block of code again and again, as long as a certain condition is true. In PHP, we have the following loop types: while – loops through a block […]

data types and constants

PHP Data Types PHP data types are used to hold different types of data or values. PHP supports 8 primitive data types that can be categorized further in 3 types: Scalar Types (predefined) Compound Types (user-defined) Special Types PHP Data Types: Scalar Types It holds only single value. There are 4 scalar data types in PHP. boolean integer float string PHP Data Types: Compound Types It can hold multiple values. There are 2 compound data […]

Syntax and variables

Basic PHP Syntax. A PHP script can be placed anywhere in the document. A PHP script starts with <?php and ends with ?>: <?php // PHP code goes here ?> The default file extension for PHP files is “.php“. A PHP file normally contains HTML tags, and some PHP scripting code. Below, we have an example of a simple PHP file, with a PHP script that uses a built-in PHP function “echo“ to output the […]

Php history

                        HISTORY. PHP is a general-purpose scripting language especially suited to web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The PHP reference implementation is now produced by The PHP Group. PHP originally stood for Personal Home Page, but it now stands for the recursive initialism PHP: Hypertext Preprocessor. PHP code is usually processed on a web server by a […]

Closure Of Object In JS

Introduction to Closures in JavaScript A closure is a combination of a function bundled together with references to its surrounding state i.e. the lexical environment. In other words, a closure provides you access from an inner function to an outer function’s scope. Most of the Developers use closures in JavaScript consciously or unconsciously. It provides better control over the code when using them. Example: 1 2 3 4 5 6 7 8 9 10 11 […]

CSS Properties

CSS Colors, Fonts and Sizes: Here, we will demonstrate some commonly used CSS properties. You will learn more about them later. CSS color         = property defines the text color to be used. CSS font-family   = property defines the font to be used.  CSS font-size    =property defines the text size to be used. Example:- <!DOCTYPE  html> <html> <head> <style> h1 { color: blue; font-family: verdana; font-size: 300%; } p { color: red; font-family: courier; font-size: 160%; } […]

The flex-direction Property of CSS

The flex-direction Property The flex-direction property defines in which direction the container wants to stack the flex items. The column value stacks the flex items vertically (from top to bottom): .flex-container{  display: flex; flex-direction: column; } The column-reverse value stacks the flex items vertically (but from bottom to top): .flex-container { display: flex; flex-direction: column-reverse; } The row value stacks the flex items horizontally (from left to right): .flex-container { display: flex; flex-direction: row; } […]

« Previous Page