0% found this document useful (1 vote)
2K views

PHP Programming PDF

This document outlines the topics covered in a PHP programming course including: 1. Introduction to PHP including history, tools, and basic syntax like variables, data types, and operators. 2. Handling HTML forms with PHP including capturing form data and GET/POST methods. 3. PHP conditional statements and loops like if/else, switch cases, while, for, do/while loops. 4. PHP functions covering creation, calling, arguments, scope, and passing by value vs reference. 5. String manipulation with regular expressions using functions like preg_match(), preg_replace(), preg_split(). 6. Working with arrays including creation, accessing, looping,

Uploaded by

Desire Frk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
2K views

PHP Programming PDF

This document outlines the topics covered in a PHP programming course including: 1. Introduction to PHP including history, tools, and basic syntax like variables, data types, and operators. 2. Handling HTML forms with PHP including capturing form data and GET/POST methods. 3. PHP conditional statements and loops like if/else, switch cases, while, for, do/while loops. 4. PHP functions covering creation, calling, arguments, scope, and passing by value vs reference. 5. String manipulation with regular expressions using functions like preg_match(), preg_replace(), preg_split(). 6. Working with arrays including creation, accessing, looping,

Uploaded by

Desire Frk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

BCA416S: PHP Programming (3+1 CREDITS)

Introduction to PHP: (3L)


>
PHP introduction, inventions and versions, important tools and software requirements (like Web
Server, Database, Editors etc.)
>
PHP with other technologies, scope of PHP
>
Basic Syntax, PHP variables and constants
>
Types of data in PHP , Expressions, scopes of a variable (local, global)
>
PHP Operators: Arithmetic, Assignment, Relational, Logical operators, Bitwise, ternary and MOD
operator.
>
PHP operator Precedence and associativity
Handling HTML form with PHP: (2L)
Capturing Form Data
>
GET and POST form methods
>
Dealing with multi value fields
>
Redirecting a form after submission
PHP conditional events and Loops: (3L)
PHP IF Else conditional statements (Nested IF and Else)
>
Switch case, while ,For and Do While Loop
>
Goto, Break ,Continue and exit
PHP Functions: (3L)
Function, Need of Function, declaration and calling of a function
>
PHP Function with arguments, Default Arguments in Function
>
Function argument with call by value, call by reference
>
Scope of Function Global and Local
String Manipulation and Regular Expression: (2L)
>
Creating and accessing String , Searching & Replacing String
>
Formatting, joining and splitting String , String Related Library functions
>
Use and advantage of regular expression over inbuilt function
>
Use of preg_match(), preg_replace(), preg_split() functions in regular expression
Array: (2L)
>
Anatomy of an Array ,Creating index based and Associative array ,Accessing array
>
Looping with Index based array, with associative array using each() and foreach()
>
Some useful Library function
Reference Books:
1. Steven Holzner, "PHP: The Complete Reference Paperback", McGraw Hill Education (India), 2007.
2. Timothy Boronczyk, Martin E. Psinas, "PHP and MYSQL (Create-Modify-Reuse)", Wiley India Private
Limited, 2008.
3. Robin Nixon, "Learning PHP, MySQL, JavaScript, CSS & HTML5", 3rd Edition Paperback,
O'reilly, 2014.
4. Luke Welling, Laura Thompson, PHP and MySQL Web Development", 4th Edition, Addition Paperback,
Addison-Wesley Professsional,2008.
5. David Sklar, Adam Trachtenberg, "PHP Cookbook: Solutions & Examples for PHP
Programmers", 2014.
Lab BCA-16404SE: PHP Programming
Practicals: 30 Lectures
1. Create a PHP page using functions for comparing three integers and print the largest number.
2. Write a function to calculate the factorial of a number (non-negative integer). The function
accept the number as an argument.
3. WAP to check whether the given number is prime or not.
4. Create a PHP page which accepts string from user. After submission that page displays the
reverse of provided string.
5. Write a PHP function that checks if a string is all lower case.
6. Write a PHP script that checks whether a passed string is palindrome or not? ( A palindrome
is word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses
run)
7. WAP to sort an array.
8. Write a PHP script that removes the whitespaces from a string.
Sample string : 'The quick " " brown fox' Expected
Output :
Thequick""brownfox
9. Write a PHP script that finds out the sum of first n odd numbers.
10. Create a login page having user name and password. On clicking submit, a welcome message
should be displayed if the user is already registered (i.e.name is present in the database)
otherwise error message should be displayed.
11. Write a PHP script that checks if a string contains another string.
12. Create a simple 'birthday countdown' script, the script will count the number of days between
current day and birth day.
13. Create a script to construct the following pattern, using nested for loop.
*
**
***
****
14. Write a simple PHP program to check that emails are valid.
15. WAP to print first n even numbers.
16. $color = array('white', 'green', 'red'')
Write a PHP script which will display the colors in the following way
: Output :
white, green, red,

green • red • white
17. Using switch case and dropdown list display a —Helloll message depending on the language
selected in drop down list.
18. Write a PHP program to print Fibonacci series using recursion.
19. Write a PHP script to replace the first 'the' of the following string with 'That'.
Sample : 'the quick brown fox jumps over the lazy dog.'
Expected Result : That quick brown fox jumps over the lazy dog.

You might also like