Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 2 . 9 . 3 Hands on Practice Project 1 : Arrays DIFFICULTY LEVEL: Beginner Overview Demonstrate your ability to create a data -

12.9.3 Hands on Practice Project 1: Arrays DIFFICULTY LEVEL: Beginner Overview Demonstrate your ability to create a data-driven PHP page by creating PHP functions and include files so that Ch12-proj1.php looks similar to that shown in Figure 12.30. The data needed for this page are in a file named data.inc.php. Instructions 1. Examine the provided HTML file (ch12-proj1.html) that demonstrates what markup your PHP must eventually generate. Examine also the provided data file (data.inc.php) that contains three arrays. You will be modifying ch12-proj1.php (initially it is a copy of ch12-proj1.html) for this project. 2. Move the header and left mavigation markup in ch12-proj1.php into two separate include files. Use the PHP include 0 function to include each of these files back into the original file. 12.9 Chapter Summai 3. In the left navigation area, replace the static list of \( e 11>\) elements containing the continent names, with a loop that displays the same elements but using the data in the scontiments array. ard solass, which will echo a properly fornsed hyperlink in the following form; 5. In the left navigation area, replace the static list of \(<11>\) elements containing ghe continent names, with a loop that displays the same elements but using the dara in the teountries array. Notice that this array is an associative array, so it will require a different type of loop. Use the generatetink () function for the country link. Notice that this link contains a query string making use of the key value of the soountries array. 6. Create a fanction called outputrostmow () that takes as a single argument a post clement (Lex, a single element from the tpose two-dimensional arfay). This function will echo the necessary markup for a single post. Be sure to also use your geseratet.ink () function for the three links (image, user name, read more) in each post. Notice that these links contain query strings making use of the userld or postld. 7. Create a function that takes one parameter. This parameter will contain a number between (and including)0 and 5. Your function will output that number of gold star image elements; after that it will also output, however, many white star images so that five stars in total are displayed. 8. Modify your output Post voou () function so that it calls your star-making function. 9. Remove the existing post markup and replace with a loop that calls output Postrou (). Guldance and Testing 1. Remember that you cannot simply open a local PHP page in the browser using its open command. Instead you must have the browser request the page from a server. If you are using a local server such as XAMPP, the file must exist within the htdoes folder of the server, and then the request will be localhost/ some-path/ch12-proj1.php.2. Break this problem into smaller steps. After each step, test the page in the bforwser. 3. Verify that your page works correctly by altering the data in data.inc. php. i have html file and running this we get output but i want this output using avobe instruction. and also i have data.inc in which i have array data. html code here:-

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

What is the relationship between humans and nature?

Answered: 1 week ago