- 1). Open a blank plain text file. Type the line "<?php" (without quote marks) to start the PHP script.
- 2). Enter this line to create the array that will be added to the unordered list:
$values = array('apple', 'orange', 'pear', 'plum', 'grapefruit'); - 3). Type these lines to create the HTML document:
echo "<html>";
echo "<body>";
echo "<h3> My Favorite Fruits</h3>".PHP_EOL;
echo "<ul>"; - 4). Create the "While" loop that will print each of the list items to the screen. Each item will have a bullet before the value:
$num=count($values);
$i = 0;
while ($i < $num){
echo "<li>".$values[$i]."</li>".PHP_EOL;
$i++;
} - 5). Close the list, the HTML document and the PHP script with this code:
echo "</ul>";
echo "</body>";
echo "</html>";
?> - 6). Save the file with a ".php" file extension.
Tags
PHP
Programming
C C++
ASP
Development Tools
Ajax
XML
Javascript
Python
VB
VC
perl
dephi
Ruby
sql
technology
Microsoft Access
Excel
ffice
Powerpoint
Word
Oracle
Related Posts "Technology"
-
Web Development Dubai - Web Design Dubai - Website Design Dubai
7/11/2019 4:38:00 AM -
Make a Wise Decision While Selecting the Seo Usa Company
7/10/2019 11:11:00 PM
You might also like on "Technology"
Make your website compatible for all browsers
7/10/2019 5:33:00 PM
Top IT Project Fails of All Time
7/10/2019 4:41:00 PM
Ideas for Website Designing
7/10/2019 2:47:00 PM
How Custom Application Development Can Help the SMEs
7/10/2019 7:44:00 AM
JavaScript By Example
7/9/2019 10:52:00 PM
What a Web Designer can do For you?
7/9/2019 10:42:00 PM
How to Get an Image in Java
7/9/2019 6:14:00 PM
19- What is the role of technology services?
7/9/2019 3:18:00 PM
Studying About Arthritis And How To Ease It
7/9/2019 3:08:00 PM
Dirty Delphi Localization
7/8/2019 4:56:00 PM
Advantages Of Hiring A Professional To Build Your Wordpress Website
7/8/2019 4:34:00 PM