Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve the ff You can do the part of this question on separate pages, or all on one Part A Start with the following line

solve the ffimage text in transcribed

You can do the part of this question on separate pages, or all on one Part A Start with the following line of php code: Snames-"Harry Potter, ron Weasley, Hermione Granger, lavender brown, Pavarti patil, NEVILLE Longbottom, Seamus FiNNegan, Dean Thomas" Split the string into an array called $arrayNames Add draco Malfoy to the end of the array (your solution must assume you don't know how many things there currently are) Do a case-insensitive sort of the names in the array Use a loop to traverse $arrayNames and for each value make sure the first letter (and only the first letter) of the first and last name is capitalized, and output the names in an unordered list Use the house colour classes defined in the CSS below and modify the loop/list item output so that if the name doesn't contain the letter "h" (case insensitive) the list item appears in Ravenclaw blue, otherwise it appears in Gryffindor red 1. 2. 3. 4. 5. 6. "griff{color: #660000;} .rav { color: #000066;} Part B Starting with $string "I swear to tell the whole truth", use the substr_replace ) function, to accomplish each of the following (each step should be output to the screen and use the new string generated in the previous step) Insert the word "solemnly "before the word "swear" by counting from the beginning Replace the everything starting at "whole" with "no good", counting from the end of the string Remove the words "tell the" using a php function to determine that starting position Insert the words "I am up", before "to" using a php function to determine the starting position 1. 2. 3. 4. Part C Write the necessary PHP to generate a multiplication table for all values within a defined range If you've forgotten your primary school math, Googling a few examples of multiplication tables should help Use the PHP define() function to set up your code so that the range of the multiplication table (low and high extents) can be easily altered by changing the definition of one or more defined constants. Your output should be displayed as a dynamically generated HTML table with header cells labeling each row and column and a caption that describes the table's purpose and the current range (high and low extents). You should keep as much of your HTML out of echo statements as possible Apply at least enough basic styling to make the table readable

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

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

What are the proposed harvest strategies or exit routes?

Answered: 1 week ago

Question

Solve the following 1,4 3 2TT 5x- 1+ (15 x) dx 5X

Answered: 1 week ago