Php Programming Code Examples
Php > HTML and Php Code Examples
How to have a multiple-select box that stays selected after submit
C Program Code Merge Two Sorted Array -
C program to read elements in two array and merge elements of two array into third array. Elements of array can be merged either in ascending order or in descending order in C.
C++ Swap Two Numbers Using 3. Variable -
Swap numbers means exchange the values of two variables with each other. Variable num1 contains 20 and num2 contains 40 after swap there values num1 contains 40 num2 contains
C Find Power of a number using Recursion -
First give a meaningful name to our recursive function say pow(). The function must accept 2 numbers i.e. base. exponent and calculate its power. Hence, take 2 parameters for base
Swap Array Element and Reverse an Array -
To reverse an array in C++ programming, you have to ask to the user to enter the array size and array elements. Now start swapping the array elements. Make a variable say temp of
C++ Sample Calculate Power by Recursion -
This technique can only calculate power if the exponent is a 'positive integer'. To find power of a number, you can use pow() function. C++ program calculates the power of any number
Accept Two Integers and Check if They are -
Take the two integers as input and store it in the variables x & y respectively. Using if, else statements check if x is equal to y. If they are equal, then print the output as "x and y are...
Calculates Area & Circumference of Circle -
To calculate "area and circumference" of any circle in "C++", you have to ask to the user to enter the radius of circle, place the radius in a variable say r and make two variable, one for
Code split an array from specified position -
Program code splits an array from specified position & add first part to the end. program first accepts an array. And then splits an array according to the user specification. Now it...