- BMW
- Dastun
- Honda
Introduction
PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..
<?php $color = array('Dastun', 'Honda', 'BMW'); foreach ($color as $c) { echo "$c, "; } sort($color); echo "<ul>"; foreach ($color as $y) { echo "<li>$y</li>"; } echo "</ul>"; ?>
Result
![Write a PHP script which will display the Cars in the following way using array](https://techstudys.com/wp-content/uploads/2021/07/1-1-26.png)