Php Language And Its Importance Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.



Internet is the main source of extraction of information used by people in today's world. There are a lot of web sites that are used to get the information of our interest. As a result of this extraction of information can be quite a difficult job. This is where we use data mining which helps us in extracting patterns from the data. Web mining is known as extracting information from the web using data mining techniques. Web mining is very popular now-a-days as it helps in identifying patterns of information over the Web. Retrieval of information is the first and the most important step where the relevant data is collected. Perhaps a more convenient way for information extraction is to specify the keywords as it helps in extracting only the required information instead of getting overloaded with a lot of unnecessary data. Another important point to note that is to make sure that the extracted information is valid, reliable and precise. Hence it is very important to extract the information from trusted Website when such situations occur. This project uses the Web-mining technique to display the list of conferences that are taking place for a specific time period based on the inputted keywords.


When the user interacts the application through a Web browser, it is called Web base or Web application. When we use a database for the Web application for storing the information for quite a long time then it is called Web database application. The important thing here is the database, which is the long term memory where the information is stored for the application. We can consider a database as an electronic file cabinet which stores the information in a very organized manner so then it will be very easy to access it whenever it is needed. Users who are interested to know about the upcoming conferences based on their field of interest will always find it useful if the information is presented in a clear and disciplined form. Precision of the data presented can be ensured as the end user provides the keyword, field of interest and the time period of the data to be displayed.


To maintain a Website that shows the list of conferences for a particular duration according to the given preferences. The server should be maintained in such a way that it can access the Web, search for the contents using the keywords, and then display it in a tabular form. The challenge here is to avoid the duplicate value as the keyword can be used for multiple field of interest. So our aim is to club all the keywords together so that the required result is achieved.

Input the values from the user such as field of interest, month, etc

Go to the array of strings where the contents are stored.

Check if the values according to the input are present in the array of strings or not



Display no conferences.

Eliminate unnecessary values.

Display the table

Figure .1: A simple block diagram that shows how the project should be completed.


The language used here to complete the project is PHP. PHP or PHP: Hypertext Preprocessor is one of the most powerful scripting languages and it is used commonly in most web development based projects. We embed the PHP code in html documents and this is interpreted by a web server such as a WAMP server to produce dynamic web pages. One main advantage of PHP is that there is no need for knowing technical details such as how to interact with the database. The name of the database and its location is all that we need to input and PHP handles the rest. A connection to the database is established using PHP and the instruction is passed to it. PHP returns the results from the database after execution of the instruction.

PHP is often used with MySQL. MySQL is used to store the values and retrieve from the database. PHP provides the application part of the Web database application.

Advantages of using MySQL along with PHP are:

Both were designed specifically for using and building dynamic web sites.

They're easy to use and are designed to produce a web page quickly.

MySQL and PHP together provide a fast way for delivering dynamic web pages.

PHP has many features which helps in communication with MySQL.

PHP language is mostly used in programs that use application tasks.PHP is very versatile as it can be used to perform simple tasks such displaying a web page as well as complicated tasks such as accepting and verifying the inputted data. One of the tasks that this project demands is to extract data from the database- and PHP has built -in features to use when writing programs that helps in this operation.[1]

The statements in PHP are embedded in the HTML files that contain PHP tags. Usually when the application requires any kind of action which requires storing the data or retrieving the data we use certain PHP statements and it is normally designed to interact with a database written in MySQL. Only one statement is needed in PHP to connect to the appropriate database, which tells the PHP the location of the database and also its name and password. All these data's are needed to connect to the database. It is not needed that the database should be present on the same system as the Website. One advantage of PHP is that it can communicate with a database across a given network.[1]


A general introduction about PHP language and its importance is given here. The problem description of the project and a basic block diagram which describes what the program should do is described here. The methods used in order to find the solution is generalized under the topic methodology.




One of the most popular scripting language based on server side is PHP. The PHP code is first embedded as the HTML document and it is then interpreted by a Web server which helps in generating the Web page document. The HTML code is directly entered by the code and hence when the user visits the Website the code is generated automatically. As PHP is a server side application, a special browser for browsing is not needed.[3]

The first PHP code was written by Rasmus Lerdorf in 1995 which was used to track the visitors who were visiting a particular webpage. Since then PHP has been evolving as an open source code. The Perl scripts called as the 'Personal Homepage Tools' which helped him in maintaining his homepage. These scripts were then rewritten in C programming language.

The simplicity of PHP is its beauty. The ease to understand them and implement them makes it simple and convenient to use. PHP can be coded by anyone who has a background in C, HTML or Javascript. This language is very much similar to C, barring the fact that people who have worked in PHP will be more comfortable working with that rather than any other programming language.[5]


It's fast : A lot of system resources are not being used by PHP and hence its execution time is less which results in the increase in speed and it also doesn't slow down the other processes. As it is used as an Apache model in C language it loads and executes really quickly. The advantage of being an open source is that it works together as a community to fix all kinds of errors or bugs.

Ease of use : This language contains a lot of special features and functions that helps in creating web pages that are dynamic.

Security : User cannot see the PHP code hence it is more secure.

It's customizable : The open source license allows programmers to modify the PHP software, adding or modifying features as needed to fit their own specific environments.


PHP is generally embedded in HTML code. We use tags to enclose the PHP language using the HTML tag that is stored in HTML code in the same way we use for other HTML tags. The web pages are created or edited the same way we do for HTML pages.

Web server can be considered as a software that delivers the created web pages to the world.PHP works with web server. The action that takes place when we type a URL into the web browser is that the URL requests to send an HTML file at that URL. The web server then sends the HTML file. The browser reads the HTML file and then displays the requested web page. When we click a link in the web page we request the web server to send a file.

The output is sent by the Web server to the web page only when the PHP language statements are processed. The PHP language statements are not included in the output sent to the browser, so the PHP code is secure and transparent to the user[2]. For example, in this simple PHP statement:

<?php echo "<p>Hello World!!!</p>"; ?>

<?php is the PHP opening tag, and ?> is the closing tag. echo is a PHP instruction that gives the putput of the upcoming text. The PHP software processes the PHP statement and outputs this:

<p>Hello World!!!</p>

this is a regular HTML statement. This statement is then delivered to the web browser. The browser interprets the HTML code and displays the Web page with the output-Hello World. The PHP statement is not delivered to the browser , so the user never sees any PHP statements[2].


A database is used for storing data. The database is organized and managed by a DBMS (Database Management System). A Relational Database Management System is a type of DBMS in which data is stored in a set of related tables. An example of such a relationship is the primary key- foreign key relationship.

Storing data and retrieving data from a database table can be made programmatically. First the program needs to establish a connection to the database. Then the data is supplied and a request is made to store it in a specified location in a database table. When retrieving the data from the database the program makes a request to get back the data. When the user interacts with the web page the application program runs with the connection to the database. For example, when the user types in a keyword, the program checks in the database for the keyword and outputs the data accordingly.



December 10-12, 2010

International Conference on Immunology

November 3-5, 2011

Financial Conference

April 16-18, 2011

International Conference on Computer Control.



An in-detail information of PHP is given here. Its advantages while dealing with tables, its functions, mechanism, etc are discussed here. The reasons for using databases are also given here.



Developing a web database application is not just moving data into or out of the database. It has mainly the following stages :


Organizing data


Building the database

Writing the application programs


This is the most important step in developing the application program. When coding we should have a clear idea about the type of database, number of fields, etc. It is a time-consuming job when we discover that there has been an error in the output and that we have to start the coding again from the beginning. Planning well in advance prevents such situations. It also keeps us focused on our application and this in turn helps us from writing unnecessary functions and variables. The several sub-steps of planning are:

Purpose identification

The first step in the planning phase is to identify exactly why we're developing the application and what we want from it. Here the main purpose is

To produce a list of conferences using the specified keywords given by the user.

After we identify the general purpose of our application, we have a make a list of what we want that application to do.

These are the following things that this project demands:

Display a text box, so that the user can enter his keywords relating to the topic of the conference.

Display a drop down menu that shows the field of interest

Display a drop down menu to specify the month.

Ease of use

How the web page is going to work is very important to be known in addition to planning what the website is going to do. Ease of use of the application is very important. If the users can't find what they want then they aren't going to use it,

Making the application easy to use is necessary and important. While using the web the following issues arise:

Navigation: The contents of the webpage should be obvious and easily locatable by the user.

Access: We should design the webpage accordingly so that only the people who are supposed to see the webpage access it.

Browsers: It is possible that different browsers display the same HTML file differently.

Leaving room for expansion

A web application changes over time. As a result we must leave space for new functions. The application should be flexible to changes which may occur later. It is also possible that the web site software improves so that the web application can do things that it couldn't do initially. Whatever reason it may be, the web page will change. Hence when we code the program we should keep such future changes in mind.


After the planning phase comes the organizing phase. Designing the database includes identifying the data that we need and organizing the data in the way required by the database software.

This project demands that the database gets the data from the internet. The PHP application must be designed in such a way that when a user enter its keywords, it must be able to club the keywords, interpret it and extract the appropriate data from the internet and then show the content of the database. Care should be taken when this process is done as there can be the occurrence of duplicate values, inappropriate and useless data or impossibility of extracting the data from the internet. Hence the program must be designed accordingly with proper care.[2]

The prime thing of each table is an object about which we are storing the information (here the object is conferences). The next thing we do is creating a table for each object. The table name has specific formats, such as the name must be a valid character string, it can contain numbers, dollar signs, letters or underscores It's a common custom to name the table in singular. Thus here the table name would be conference.

In a database an object is an entity which has attributes. The table row shows the entity and the table column shows the attributes. For example here each row contains information about the conferences only for a particular time period. Some of the attributes contained are conference name and date.


The different steps involved during creation of a program are described here. These various steps are shown in details and its importance is also explained. As we deal with a web database application the various steps while doing so is shown. Also the screen shots of the server and the home page both before and after user input are given under this chapter.




The basic syntax for the PHP program is given earlier in the report. PHP is enriched with a variety of functions that enhances its usability. As we know PHP can be used to build very large and complex websites. Functions such as querying a database, uploading files, creating or reading files on the server, etc, can be done easily and tension-free using PHP. Here we show the various variables that help us attain such tasks.


Simple variables

Variables can be considered as a temporary storage medium. It is usually used to store a value. The stored value can then be accessed simply by giving the variable name. In PHP it is a hard and fast rule that all the variables must begin with a '$' symbol. Following the $ sign, the variable name should begin with either letters(a-z, A-Z) or underscore( _ ).It should not begin with a number. Anyhow the rest of the variable name can contain letters, underscore, numbers or a combination of all. We are not supposed to use space to separate the variable name. An underscore ( _ ) can be used for such cases. For e.g.,


$sample_variable="Test run !!" ;

echo $sample_variable ;


Here the text Test run!! will be the result.

Another prime feature of variables that store numeric values is that it can be used to perform calculations. Basic calculations like addition, subtraction, multiplication and division can be performed very easily in PHP.

For eg,


$a=1 ;



Echo $c ;


The above code will show the result 9.

Concatenation is another function that can be applied to variables.

When we want to output multiple statements or other texts to the screen we use multiple echo statements or in a much simpler way we can use one echo statement with a dot ( . ) between each part.[3]

For eg,

Option 1:




$c=$a * $b ;

echo $a;

echo "*" ;

echo $b ;

echo "=" ;

echo $c ;



Option 2




$c=$a * $b;

echo $a. "*" .$b."=".$c ;


The above code results in 3+5=8

Form variables

Applications that run on the website mostly rely on HTML forms so that the user can perform the specified tasks. Most of the user interactive web pages contain a text area where we enter the necessary inputs. Content Management Systems allows the users to provide the content and save it somewhere in the database.

When the form has been submitted it becomes a variable of its own. Form variables are usually stored in a special type of variable called arrays. There are two methods to submit the forms , get or post. The method get is used as default. If we want to use the other method, we have to specify that explicitly.

Example for get method

To input the first name and the last name of the user.



<title> PHP Form Variables Example </title>



First name: <php echo $_GET["First name"] ; ?> <br />

Last name : <php echi $_GET["Last name"] ; ?>


We use POST instead of GET inorder to pass the variables via POST method.

Array variables

Arrays are used to store a group of interrelated data in one variable. Storing the data as an array has many advantages over storing the data in separate variables. By using arrays we can store and output the contents of the array in a progressive fashion. There are three types of arrays in PHP. They are:

Numeric Arrays

Associative Arrays

Multidimensional Arrays

Numeric arrays

In these types of arrays we use the numbers as the identifier or key. The key is the unique ID of the values stored in the array.When accessing the values we need to provide them only with the identifier. The numbering of the values always starts with zero.

While creating numeric arrays we can select any one of the methods from

Manual key assignment

Automatic key assignment

For eg, when using manual key assignment

$array_name[0] = "first value" ;

$array_name[1] ="second value" ;

Whereas while using automatic key assignment

$array_name = array("val1","val2") ;

For the displaying the contents of the array we need to specify only its key.

For eg,

$car = array("nissan","toyota","audi") ;

echo $car[1] ;

The result will be Toyota.

Associative arrays

Associative arrays are more or less similar to numeric arrays. The difference here is that here we use a value for a key unlike a number where we use for numeric arrays.

As in numeric arrays here also we have two ways to input the values.

Option 1 :

$ array['key_name'] = "value 1";

$ array['key_name'] = "value 2";

Option 2 :

$array_name = array("key_name" => "value 1","key_name" => "value 2");

We can display the content like in numeric arrays

$mobile("N900" => "AED 1500","N8"=>"AED 2000") ;

echo "N8 : " . $mobile["N8"] ;

The result of the above code will be

N8 : AED 2000

Multidimensional arrays

We can store an array inside an array. Such arrays are called multidimensional arrays. In simpler terms we can state that the contents of the array will be another array. We can loop this as many as times we wish.











Fig 4.1 : A pictorial representation of how values are stored in a multi-dimensional array.

We can create the above array using the following code :



"Fruit" => array






"Vegetables" => array





"Grains" =>array




) ;


The different PHP variables, arrays and functions are described here. An in-detail information on the PHP code is given here. We use these variable formats and functions in the program. PHP is enriched with a lot of in-built functions and variables that its scope is really wide.




We use the IF statement in order to execute a block of code only when the condition is true. It merely means that if a particular condition is true then execute the block or else skip it and go to the next block or statement. The syntax is as follows


Block of code which is to be executed when the condition is true ;

In the following example we assign a value to the variable $fav_veg and then compare this value to the inputted value and then give the output accordingly.

$fav_veg = "cabbage";

if ($fav_veg=="cabbage")


echo "Your favourite vegetable contains 3% fibre" ;


If the user inputs the favourite vegetable as cabbage then it will show the result

Your favourite vegetable contains 3% fibre.


To execute something which is not true we can use this statement.

For example

$fav_veg = "Potato" ;



echo "Your favourite vegetable contains 3% fibre";




echo "Sorry, value not found";


Here the result will be

Sorry, value not found


Suppose we know the value of(in this case the fibre content) of another vegetable then we can add that value and hence make a new custom message for that vegetable. We can use else-if how many times we like.[9]

For example,

$fav_veg = "potato" ;

if($fav_veg = "cabbage") {

echo "The vegetable contains 3% fibre" ;


elseif ($fav_veg =="potato")


echo "The vegetable contains 1% fibre" ;




echo "Sorry ,value not known" ;


The above example gives the result

The vegetable contains 1% fibre


As mentioned earlier we can use many if else-if's in order to execute different blocks for different conditions. But there is another efficient and fast way to execute the same without having to type so many statements. That is where 'switch' statement comes into action. Switch statements are executed line by line. It starts its execution only when it encounters a case statement. It stops its execution when it encounters a break statement. It is very important to put a break statement or else the program will execute the case statement infinitely. There can be empty cases in a switch block. When such a situation happens the control of the program simply passes over the next case statement. There is also a default label which is executed when no match is found. [8]

Here is a sample switch statement which is used to check if the number inputted is less than or greater than a given value.


case 0:

case 1:

echo "i is less than 2 but not negative" ;

case 2:

echo "i is 2" ;



PHP also has the facility to create functions so that we don't have to type the same piece of code above and over again to different parts of the program. PHP functions can also be used to accept and pass the parameters or arguments. The function coding in PHP is very similar to the way we use it in C.

For example,

function fav_veg()


echo "My favourite vegetable is Cabbage"



Different statements that are used in PHP such as, if, if-else , if-else if and switch statements are described in this chapter. Though these functions are also there in C ,when used in PHP, its scope is widened more.




The program basically has three parts i.e list, show, home. The list and show is coded in PHP whereas the home is coded in HTML. The list part inputs the contents of the webpage , searches for the tag and then converts it into an array and stores it in a variable which is then passed to the functions which is used to search the link. The show file is used to read the array and display it. It is here where we display a drop down menu for the selecting the month for which the conference should be displayed. Home file is the actual webpage. It contains the format and design of the actual webpage that is shown.


The first step we do here is the conversion of the list of fields into an array of strings. This is done because then only it will be converted to a javascript which is then used to store it in a temporary variable for future purposes. The first step for doing this is the definition of a function, in this case a function named searchforLinks. The variables passed here are $tag, $doc and $attribute. When we convert the webpage to an HTML file we will be able to find that every field(for eg, the field of interest, month, etc) will have a tag name. This tag name is accessed by the function getElementsByTagName which is pointed by the variable $doc. This value is then stored in another variable named $elements.

The next step is the creation of the array. The array values are stored in the variable name $jsArray. The array value always starts with the '['. Using the for loop we enter the values into the array. The values are strings. It is converted to js array by the javascript in homepage. The values are stored in the variable $node. The field of interest tag has two parts 'a' and 'href'. The next step is the entering of this href attribute. Next we have an if statement which is used to enter enter a ',' after each field of interest.

A function for searching the attribute value is also used. This function assigns the attribute value to a variable. This helps in knowing the position of the array which is read. This function returns the attribute value when it is called.

The next function is used to read the file ,which is the webpage here. For the function , the url is passed as the argument. The file is opened using the function fopen and the contents are stored in the variable named $htmlFile. The HTML file here is read line by line. It means that the contents which is the field of interest here is stored per line into the variable named $html. This value of the variable is returned to the function when it is called.

The last and the most important step in the list bar is done using the listIndex function. Here also the url is passed as the argument. The one important thing we do here is the creation of the DOMDocument. The DOMDocument is used to parse the HTML documents.It is a standard function which comes in the library. This function returns the searchforLinks function.


The next part of the program mainly deals with reading the array and displaying the final content based on the inputted values such as keyword, month and the field of interest. Firstly we define a function called search which has the variables $doc, $month and $searchText. First of all we are getting the tag name for the months to be displayed to this function. This value is stored in variable called $dt. In the next step we are getting the tag name for the month and this is stored in the variable $links. Based on the inputted values it then loops into the javascript array. The format of the javascript array is ['Date','Text','Link']. Using the for loop the values are searched and then the values are accessed. These values are stored in the variables $nodeLink and $nodeDt. Based on the month and the keyword it searches for the tags <a> and <href> which are the attributes of the field of interest. This value is stored in the variable $link. Only the values for the specified month and the specified keywords are shown. Rest all the other values are omitted. We are assigning the value false to the month flag and the search flag if there is any string available with respect to the inputs. When the keyword is same as the conference name then the search flag becomes true or else we have to search for the position and then make the search flag true. Similarly we do for month flag and we get the value true. When both the search flag and the month flag is true we then extract the value from the javascript and the necessary value is shown. As like in list.php we implement a function to seach for links. This function returns the conferenceList. After this function is executed the conferences can be displayed. This operation is performed by the function listConference. This function has the $url, $month and searchText as its variables. Then each value is read which is stored in the array and the value is displayed accordingly. Many of the functions used while entering the variables in the array (for example, making a DOM document, opening the file, searching for links, etc) are repeated here also.


The details shown in the webpage are coded here. At first we define a function named removeAllchildren. This function is used in order to extract the required cell from the table and omit the others. Next we have a function for posting HTTP request from the server. All the necessary function to get the values required to post in a web page are implemented by this function. The next function show when executed shows the values as it is shown in the web page. Here we first declare a variable named confSelect which is used to get the conference selected from the conferenceList. The next step is the declaration of a variable to get the month selected. This is done by the variable monthSelect. Here also it selects the month using the index which is the drop down menu Both the selected month and conference is stored in the variables month and file respectively.

To input the values into the table we are using mainly four variables.

tbody: A variable in which the body of the table is created. It only creates an empty table.

thead: A variable in which the header ,in this case date and link is created.

tr: A varable used to store the row values of the table.

td: A variable used to store the cell values of the table.

The table thus created is then shown on the web page.


Function Name




Searches the list according to their attributes and then stores the value into a variable.



Searching for links so that the web page can be displayed.



To get the elements by tag name. It is like this how the conference list and the month list is stored.



A function used to open a file or a web page and grant permission to read the contents and work on it.



This function reads the web page line by line and also creates a DOM Document to suppress all the HTML parsing errors.



This is a user-defined function used in outputting the table. This function opens the array, gets the tag name only for the values corresponding to specific input. This function returns the output.



This function is used to display the contents of the array of strings. It opens the array, reads the content, checks the tag name and then displays it.

Fig 6.1 : A table showing the various functions used and its actions


6.3.1 Inputs :

Conference categories



6.3.2 Algorithm :


Step 1: Load the url of the webpage.

Action : Here the url of the web page is loaded into by defining a function. This is done so that the web page that we are going to create can communicate with the page of the website we are loading.

Step 2: Open the webpage, read the contents line by line and store the HTML contents in a temporary variable.

Action : Here we define a variable so that the contents of the website are read and stored in it. The important point to be noted here is that the web page is read line-by-line. This function is continued until the a certain limit has reached.

Step 3: Content is stored as string, passed to DOM document to be parsed, and from the DOM the link tags are searched.

Action: The content that was read through the earlier steps is now converted into a DOM document. This is done so that it can eliminate any kind of parse errors that may occur during the execution of the program.

Step 4: Search for links in order to go to the required web page. It is searched using its tags.

Action: The contents of the actual web page are read by the array of strings in the form of tags. Every field will have a tag name. Here we define a function to go to the web page and search for the links according to its tag name. Later on, we return the variable that stores this information.

The steps after this occur when the user interacts with the web page.

Step 5: Asks the user for the required input such as conference name, month and keyword.

Action: Here is where the user input takes place. Here we define variables to retrieve the information from the web page and store it in a variable. The links also gets stored here.

Step 6: When the conference is given through the drop down menu, its tag is also stored.

Step 7: The same happens when the month is given.

Step 8: The link is then stored in a variable according to the tags of the input.

Action: Here after the user input the tag name is stored in a variable and that value is stored in another variable.

Step 9: The control is then transferred to the array in which the values are stored.

Action: The array where the necessary values are stored are passed on to another variable in this step.

Step 10: The required value is displayed.

Action: Here we define a function which returns the array value with all the essential details. After the return statement is executed the table is displayed.


6.3.3 OUTPUT

Display the table only with the necessary fields.


User inputs

The tag is stored

Load the url

Content is stored as string

The result is displayed.

The links are stored according to the tags

DOM document

Stores the contents in a temporary variable Opens the webpage

Fig 6.2 : The algorithm design of the program


Fig 6.3 : A screen shot of the wamp server.

Fig 6.4 : A screen shot of the webpage before the user entering any input.

Fig 6.5 : A screen shot of the wamp server after the user enters the inputs.



The web page that is being displayed in the current state is the result of a single web site. The current project can be extended in such a way that information from a lot of other websites can be extracted and hence increasing its reliability and usability. Also another feature that can be added to this web page is an option for the users to check-in while browsing for the information. This would help them in reserving a seat before hand and avoiding the trouble of checking-in in some other way. By using a counter variable, we'll be able to know the number of reserved users. This would help us in many ways such as, arranging the venue accordingly, conduct the conference in an efficient manner and so on.



The main lesson learnt through this project is the knowledge of how to use the programming language PHP. It also helped in getting an exposure of how a real programming should be done. This project has really helped in getting a knowledge of how the contents of a particular web page must be stored and its usage.



A conference management program has been created using PHP as a client-server application. The information has been extracted from the actual website and has been modified so that only the values according to the user's inputs are displayed. Various functions were defined that enabled this operation. The web page was maintained by a free server named wamp server. Wamp server is an offline server, hence making it more flexible. All these factors put together helped in making the created web page more presentable and user-friendly.



This project is used to list the conferences for a particular time period. PHP is the main language used here. Information extraction from the web or web mining is the concept used here. Here the code is divided into three parts. The first part gets the content from the actual website and stores the contents in an array of strings. It also involves in retrieval, storage and design of the web page. The second part is used for the displaying the stored content. Here we define the functions and variables necessary for the action to take place. The third part contains the HTML code for the display of the webpage. Here is where the designing process is done. The logic used here is the concept of trees. We traverse the table like how we traverse the tree and eliminate the unnecessary values by removing the child of that node.