2
1. Write a PHP code to print following Statement: Shree M. & N. Virani Science College - Rajkot 2. Write a PHP code for sum of two values which are entering by the users. 3. Write a PHP code for find Radius of Circle. 4. Write a PHP code to check the Given Number is Palindrome or Not. 5. Write a PHP code to Check the Given Number is Armstrong or Not. 6. Write a PHP code for following triangle: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 2 Write a PHP code for following triangle: 1 2 3 4 5 6 7 8 9 10 3 Write a PHP code for Print following Series: 1, 10, 2, 9,3,8,4,7,5,6 4 Write a PHP code for following Triangle: 1 2 3 4 5 1 2 3 4 1 2 3 2 2 1

Php Lab Assignment -1

Embed Size (px)

Citation preview

1. Write a PHP code to print following Statement: Shree M. & N. Virani Science College - Rajkot 2. Write a PHP code for sum of two values which are entering by the users. 3. Write a PHP code for find Radius of Circle. 4. Write a PHP code to check the Given Number is Palindrome or Not. 5. Write a PHP code to Check the Given Number is Armstrong or Not. 6. Write a PHP code for following triangle: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 2 Write a PHP code for following triangle: 1 23 456 7 8 9 10 3 Write a PHP code for Print following Series: 1, 10, 2, 9,3,8,4,7,5,6 4 Write a PHP code for following Triangle: 12345 1234 1 23 2 2 1

7 Create a static web page which have 4 radio buttons and the options are display 1 to 5, display 5 to 1, display sum of 1 to 5, display sum of square of 1 to 5. When user selects any option the output must be in the next page. 8 Create a static web page which has 3 radio buttons first is for uppercase, second is for lowercase and third is for reverse. When user selects any option the output must be displayed in the next page. 9 Create a php page which has two text boxes and button for addition when you click for the addition the ans must be display in the alert box. 10 Write a php program which have one text box two buttons, which are ASCII and character, if you click on the ASCII button it will print ASCII value and if you click on character it will print appropriate character value. 11 Create a web page have a one textbox & button. Write a program to check textbox value is greater, less or equal to zero. 12 Create a web page have a three textbox for enter no1, no2 & choice. Write a program to perform arithmetic operation using switch case. 13 Create an UDF which counts no. of arguments passed in a function call and display each argument. (Use func_num_arg, func_get_args function) 14 Create an UDF which returns the cube of a given number.