Author: codertutor_3o6d0o

JavaScript

JavaScript is a high-level programming language that is widely used for both client-side and server-side web development. It was initially created to add interactivity and dynamic features to web pages, but over time, it has evolved into a versatile and powerful...

PHP Function

PHP Function Function syntax function function_name() { php code; } Function example <html> <body> <?php function Test() { echo "I like PHP functions!"; } Test(); ?> </body> </html> Result I like PHP functions! Function with parameters <html> <body> <?php function pFunction($p_name,...

PHP Arrays

PHP Arrays An array in PHP is a type that associates values to keys. This type can be an array, list, hash table, dictionary, collection, stack, queue. Simple array example <html> <body> <?php $courses = array("PHP", "MySQL"); echo "I learn "...

PHP For

PHP For For syntax for (initialization; condition; incrementation) { execute statement } For example <html> <body> <?php for ($n = 1; $n <= 5; $n++) { echo "<br />"; echo "n = ", $n; } ?> </body> </html> Result n =...

PHP Do…While

PHP Do…While Do…While syntax do{ execute statement }while (expression is true) ; Do…While example <html> <body> <?php $n = 1; do{ echo "<br />"; echo "n = ", $n++; } while ($n <= 3) ; ?> </body> </html> Result n =...