Question

Write a PHP statement that creates a variable to hold the name of a university and...

Write a PHP statement that creates a variable to hold the name of a university and initialize it to: "Harvard University".

Write a PHP statement that outputs a line of html to render the value of the name in the above variable as an <h2>

element.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

<!DOCTYPE html>
<html>
<body>

<?php
$txt1 = "Harvard University";

echo "<h2>" . $txt1 . "</h2>";
?>

</body>
</html>

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
Write a PHP statement that creates a variable to hold the name of a university and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write PHP that does the following: Creates 4 variables, with values “My”, “Name”, “is”, “Bill”. Concatenates...

    Write PHP that does the following: Creates 4 variables, with values “My”, “Name”, “is”, “Bill”. Concatenates all 4 variables using the concatenation operator, while adding a space between each one and assigns the result of the concatenation into a 5th variable named $stringCatResult. Display the $stringCatResult value using an echo statement. Write PHP that does the following: Creates 2 variables, with values 12 and 3 Write five separate lines of code that performs an arithmetic operation on the 2 variables....

  • Write a statement that creates a RegExp object that remembers the first and last name, but...

    Write a statement that creates a RegExp object that remembers the first and last name, but does not remember the title. Using the RegExp object's exec() method, assign the result variable with the remembered first and last name of the string userName. var userName = "Dr. Greg House"; // Code will also be tested with "Mr. Howard Wolowitz" /* Your solution goes here */ console.log(result[1] + " " + result[2]);

  • Create a folder named "TrainerApp". In that folder create the following files. Create a PHP file,...

    Create a folder named "TrainerApp". In that folder create the following files. Create a PHP file, "insert-user-form.php", with a form that has the following fields: - First Name (text) - Last Name (text) - Email (text) - Password (text) - Submit button Create another PHP file, "insert-exercise-form.php" with a form that has the following fields: - Exercise Name (text) - Description (text) - Demonstration Image (file) - Submit button Create another PHP file, "login-user-form.php" with a form that has the...

  • Write a Perl script that creates a string variable with value “This is String One”. Converts...

    Write a Perl script that creates a string variable with value “This is String One”. Converts it into array, replaces value of element 2 from “String” to “Act” and transforms array back to string. Finally, it prints original string, array and transformed string.

  • has three assignment lines, each of which creates a variable (object) with a meaningful name and...

    has three assignment lines, each of which creates a variable (object) with a meaningful name and assigns it an int value. Example: Exercise 5b months = 12 has three assignment lines, each of which creates a variable (object) with a meaningful name and assigns it a float value. Example: Exercise 5c height = 7.63 has three assignment lines, each of which creates a string variable with a meaningful name. Example: Exercise 5d speaksParseltongue = 'Harry Potter' has three assignment lines,...

  • 1. Write the php statements to connect to MySQL server and select the database named personnel....

    1. Write the php statements to connect to MySQL server and select the database named personnel. The database personnel is located at localhost server. The user id and password to log on to the server are finalexam and thePassword respectively. 2. Using the above connection, write the php statements to retrieve the name and the email fields from all records of the users table ( 'SELECT name, email FROM users') and display them one record per line.

  • 1. Print out information of PHP use phpinfo() function. 2. Write a program that check and...

    1. Print out information of PHP use phpinfo() function. 2. Write a program that check and print odd / even numbers (from number 1 to 100 using for/while loop). Display the results within an HTML table with 2 columns as shown below: NUMBERS RESULTS 1 ODD 2 EVEN 3 ODD HINT: use <table> tags to create a table, <th> tags for ‘Numbers’ and ‘Results’. Wrap code PHP inside HTML code. For example: ​<html> ​​<title>CHECK ODD or EVEN</title> ​​<body> ​​​<table> ​​​​<?php...

  • Must be done in PHP. Details below: NOTE: in #4 part B, the split function that...

    Must be done in PHP. Details below: NOTE: in #4 part B, the split function that my teacher wants me to use in this program is: str_split() 1. Create a new document in your text editor (notepad++) 2. Type the <html element, header information, and <body element. Use String Manipulation functions as the content of the <title element 3. Add the following standard PHP script delimiters to the document body: ?php 4. In the php script section write the appropriate...

  • 8. Write few lines of code that creates two arrays with malloc. Then write a statement...

    8. Write few lines of code that creates two arrays with malloc. Then write a statement that can create a memory leak. Discuss why you think your code has a memory leak by drawing the status of the memory after you use malloc and the line of the code you claim that creates a memory leak. (C Programming)

  • Q1. rewrite the exercise on April 4 by adding the following operations: 1) In the php...

    Q1. rewrite the exercise on April 4 by adding the following operations: 1) In the php script, create an associative array named $order that stores the following values: - the number of cheese toppings; - the number of pepperoni toppings; - the number of ham toppings; - the size of the ordered pizza; - the number of the ordered pizza; - the total cost of the order; - the discount rate; - the total cost after the discount. 2) the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT