PHP Arrays

An array is a collection of related values (a list of items) such as names of cities Creating an array $numbers = array(); //empty array To create an array use the function array() like: Numeric Arrays Numeric Arrays are arrays that use only numeric keys, called as numeric, indexed or ordered arrays. Associative Arrays Associative …

PHP Conditional Statements: if else, switch

If statement Execute the code if the condition is true If…else statement Switch statement Execute different code depending on a condition. The switch statement is similar to a series of IF statements If the value pass to the switch statement matches, the code that follows the case is executed. Example: Be careful! if we forget …

Difference between single-quoted and double-quoted

The most important difference between single and double quote, is that anything enclosed in single quotes is treated as literal text. Single quotes When using single quotes we must take care with apostrophes. To use the apostrophe in single quotes, we have to put backslash before apostrophe (which is named as escape character). The backslash …

Best movie recording settings for Sony NEX and Sony Alpha

eg. NEX 5N, NEX-5R, NEX-6, NEX-7 and Sony Alpha cameras These settings are also useful for other types of camera. If you want to use your camera video feature more professionally and optimized for production use, there are few easy tips.   Lens Constant aperture lenses (eg.f2.8) are more apropriate for filming instead of zoom …

JavaScript Loops while, for, do while

JavaScript Loops JavaScript loops are used to execute the same code multiple times. They can execute a block of code as long as a specified condition is true.   The While Loop The while loop execute a block of code as long as a specified condition is true. The While loop has the following syntax: …

JavaScript conditional statements

If statement The if statement is used to specify a block of JavaScript code that is executed, if a condition is true.   Example If You want to execute a single line of code in an if statement, is not necessarily to put curly braces in. However it’s a good practice to always use curly …

Javascript output, alert, console.log, innerHTML

About JavaScript Output JavaScript does not have built-in functions for display, but we are able to display data in different ways: into an alert box, using alert() method which displays an alert box with a specified message;   into the browser console, using console.log(). You may pass as many arguments as you’d like;   into …

JavaScript operators, arithmetic, unary, string

Assignment operators The assignment operators are used to assign values ​​to variables, like: They Assign the value of the right side of the equal sign to the left of the equal sign. Short form   Long form = x = y x = y += x += y x = x + y -= x …

Javascript variables, rules, examples

In other programming languages when you define a variable, you must specify its type, ie what type of information will be stored in the variable, like integer, boolean, array, etc; JavaScript is different! In JavaScript we create a generic variable and then put whatever type of value we want in it. To create a variable …