http://php.flashwebhost.com/vineesh/day5/day_5_1.php
PHP Code:
<?php
$movieNames = array('<h3> <font color="red">', 'kilukam', 'kalapani', 'minnaram', 'yoddha', 'spirit', 'drishyam', 'grand master', '</h3>
</font>');
echo strtoupper('<h4> <font color=green> For Mohanlal fans, here are some of his superhit movies list: </h4> </fong> <br>');
echo strtoupper($movieNames[0]);
echo '<br>';
echo strtoupper($movieNames[1]);
echo '<br>';
echo strtoupper($movieNames[2]);
echo '<br>';
echo strtoupper($movieNames[3]);
echo '<br>';
echo strtoupper($movieNames[4]);
echo '<br>';
echo strtoupper($movieNames[5]);
-------------------------------------------
http://php.flashwebhost.com/vineesh/day5/day_5_2.php
PHP Code:
<?php
$movieNames = array('kilukam', 'kalapani', 'minnaram', 'yoddha', 'spirit', 'drishyam', 'grand master');
echo strtoupper('<h4> <font color=red> For Mohanlal fans, here are some of his superhit movies list: </h4> </font>');
echo strtoupper($movieNames[0]);
echo '<br>';
echo strtoupper($movieNames[1]);
echo '<br>';
echo strtoupper($movieNames[2]);
echo '<br>';
echo strtoupper($movieNames[3]);
echo '<br>';
echo strtoupper($movieNames[4]);
echo '<br>';
echo strtoupper($movieNames[5]);
echo '<br>';
echo '<pre>';
echo '<h2><font color=green>print_r() Example: </font></h2>';
echo print_r($movieNames);
echo '<br>';
echo '<h2><font color=blue>var_dump() Example:</font></h2>';
echo '<br>';
echo var_dump($movieNames);
echo '</pre>';
-------------------------------------------
http://php.flashwebhost.com/vineesh/day5/day_5_3.php
PHP Code:
<?php
$movieNames = array('kilukam', 'kalapani', 'minnaram', 'yoddha', 'spirit', 'drishyam', 'grand master');
$numberOfMovies = count($movieNames);
echo strtoupper($movieNames[0]);
echo '<br>';
echo strtoupper($movieNames[1]);
echo '<br>';
echo strtoupper($movieNames[2]);
echo '<br>';
echo strtoupper($movieNames[3]);
echo '<br>';
echo strtoupper($movieNames[4]);
echo '<br>';
echo strtoupper($movieNames[5]);
echo '<br>';
echo '<br>';
echo 'Above ' . $numberOfMovies . ' are Mohanlal\'s super hit movie names.';
------------------------------------------
http://php.flashwebhost.com/vineesh/day5/day_5_4.php
PHP Code:
<?php
$shirtBrands = array('<font color=red><h2>', 'peter england', 'john players', 'van heusen', 'raymond', 'allen solly' , '</h2></font>');
echo strtoupper('This is how an Array prints using ') . 'foreach():';
echo '<pre>';
foreach ($shirtBrands as $shirtBrandNames) {
echo strtoupper($shirtBrandNames);
echo '<br>';
}
------------------------------------------
http://php.flashwebhost.com/vineesh/day5/day_5_5.php
PHP Code:
<?php
$myFriends = array('suneesh', 'melbin', 'sibichan', 'tom');
echo '<pre>';
print_r ($myFriends);
echo '<br>';
echo ucwords('I am going to add two more friends name to $myFriends array: <br>');
$myFriends[] = 'ramesh';
$myFriends[] = 'mini';
echo '<pre>';
foreach($myFriends as $friends) {
echo ucwords($friends);
echo '<br>';
}
Bookmarks