AWT IT342 5IT 19IT011
1 | P a g e
WEEK 6
Regular expression
Practical 1
 Aim: Implement following validations in a PHP form using Regular
expression in PHP.
 IP Address
 Domain Name
 Email ID
 10 digit Mobile
 Password
 User Name
 Program:
AWT IT342 5IT 19IT011
2 | P a g e
 Output:
AWT IT342 5IT 19IT011
3 | P a g e
Practical 2
 Aim: Prepare codeto demonstrate any five regex function from.
 Program:
AWT IT342 5IT 19IT011
4 | P a g e
 Output:
AWT IT342 5IT 19IT011
5 | P a g e
Array in PHP
Practical 3
 Aim: Implement following operations on array in PHP.
Array Operations (Associative Approach):
1) Sorting of array
2) Modification of Array (adding / removing / updating)
3) Traversing array
4) Merging Array
5) Counting Elements
6) Diff between two Arrays
7) Check Element Exist in Array
8) String to array and vice-versa
 Program:
AWT IT342 5IT 19IT011
6 | P a g e
 Output:
AWT IT342 5IT 19IT011
7 | P a g e
Practical 4
 Aim: Implement following operations on array in PHP.
Array Operations (Numerical Approach):
1) Sorting of array
2) Modification of Array (adding / removing / updating)
3) Traversing array
4) Merging Array
5) Counting Elements
6) Diff between two Arrays
7) Check Element Exist in Array
8) String to array and vice-versa
 Program:
AWT IT342 5IT 19IT011
8 | P a g e
 Output:

5 it awt week 6

  • 1.
    AWT IT342 5IT19IT011 1 | P a g e WEEK 6 Regular expression Practical 1  Aim: Implement following validations in a PHP form using Regular expression in PHP.  IP Address  Domain Name  Email ID  10 digit Mobile  Password  User Name  Program:
  • 2.
    AWT IT342 5IT19IT011 2 | P a g e  Output:
  • 3.
    AWT IT342 5IT19IT011 3 | P a g e Practical 2  Aim: Prepare codeto demonstrate any five regex function from.  Program:
  • 4.
    AWT IT342 5IT19IT011 4 | P a g e  Output:
  • 5.
    AWT IT342 5IT19IT011 5 | P a g e Array in PHP Practical 3  Aim: Implement following operations on array in PHP. Array Operations (Associative Approach): 1) Sorting of array 2) Modification of Array (adding / removing / updating) 3) Traversing array 4) Merging Array 5) Counting Elements 6) Diff between two Arrays 7) Check Element Exist in Array 8) String to array and vice-versa  Program:
  • 6.
    AWT IT342 5IT19IT011 6 | P a g e  Output:
  • 7.
    AWT IT342 5IT19IT011 7 | P a g e Practical 4  Aim: Implement following operations on array in PHP. Array Operations (Numerical Approach): 1) Sorting of array 2) Modification of Array (adding / removing / updating) 3) Traversing array 4) Merging Array 5) Counting Elements 6) Diff between two Arrays 7) Check Element Exist in Array 8) String to array and vice-versa  Program:
  • 8.
    AWT IT342 5IT19IT011 8 | P a g e  Output: