http://php.flashwebhost.com/annie/test.php
Code:<?php $actressName = 'Meera jasmine'; $actressName = str_replace ('jasmine', 'Anil John', $actressName); echo $actressName;
http://php.flashwebhost.com/annie/test.php
Code:<?php $actressName = 'Meera jasmine'; $actressName = str_replace ('jasmine', 'Anil John', $actressName); echo $actressName;
DAY 3 PHP PROGRAMMING
http://php.flashwebhost.com/tom/strtolower.php
Code:<?php $studentName = 'Tina' ; $schoolName = 'Bishop Moore'; $class = 'LKG' ; echo strtolower($studentName); echo '<br>'; echo strtolower($schoolName); echo '<br>'; echo strtolower($class) ;
In 3rd day tutorial, under ucfirst() function, added PHP code for ucwords()
Please edit and add examples of ucfirst() also.
Become PHP Expert in 30 days
FreeMarriage.com - Free Online Matrimonial
FlashWebHost.com - Professional Web Hosting, Designing.
DAY 3 PHP PROGRAMMING
ucfirst
---------
http://php.flashwebhost.com/tom/ucfirst_1.php
Code:<?php $movieName = 'malayalam film perucahzhi'; $movieName = ucfirst($movieName); $starring = 'mohanlal, mukesh'; $starring = ucfirst($starring); echo $movieName; echo '<br>'; echo $starring;
http://php.flashwebhost.com/tom/ucfirst.php
Code:<?php $filmName = 'peruchazhi'; $director = 'arun vaidyanathan'; $producer = 'sandra thomas'; echo ucfirst($filmName); echo '<br>'; echo ucfirst($director); echo'<br>'; echo ucfirst($producer);
ucwords
-----------
http://php.flashwebhost.com/tom/ucwords_1.php
Code:<?php $movieName = 'malayalam film perucahzhi'; $movieName = ucwords($movieName); $starring = 'mohanlal, mukesh'; $starring = ucwords($starring); echo $movieName; echo '<br>'; echo $starring;
http://php.flashwebhost.com/tom/ucwords.php
Code:<?php $filmName = 'peruchazhi'; $director = 'arun vaidyanathan'; $producer = 'sandra thomas'; echo ucwords($filmName); echo '<br>'; echo ucwords($director); echo'<br>'; echo ucwords($producer);
DAY 3 - strlen()
http://php.flashwebhost.com/vineesh/day3/strlen.php
Code
Another one:Code:<?php $sentenceOne = 'Hello, I am Vineesh Mohan'; $sentenceTwo = 'I am working in FlashWebHost.com'; $sentenceThree = 'FlashWebHost.com provides Domain Registration, Hosting And Web Design Services'; echo $sentenceOne . '<br>'; echo $sentenceTwo . '<br>'; echo $sentenceThree . '<br> <br>'; echo strlen ($sentenceOne) . '<br>' ; echo strlen ($sentenceTwo) . '<br>' ; echo strlen ($sentenceThree);
http://php.flashwebhost.com/vineesh/day3/strlen_1.php
Code:<?php $name = 'Vineesh Mohan'; $place = 'Kodamthuruth'; $city = 'Alappuzha'; echo 'I am ' . $name . '<br>' ; echo 'My native is ' . $place . '<br>'; echo $place . 'is located in ' . $city . ' district. <br> <br>'; echo 'First two lines contain ' . strlen ($name) . ', ' . strlen($place) . ' letters respectively. And the Third line contains ' . strlen('Kodamthuruthis located in Alappuzha district.') . ' letters.' ;
Last edited by vineesh; 05-10-2014 at 10:36 AM.
in the last code str_replace is used to delete word.Code:<?php $company='bizhat'; $sent=' HEY buddy how are you doing'; echo 'hey '.ucwords($company.' is cooler THAN ANYTHING.'). strtolower(str_replace('buddy', 'man', $sent)); echo '<br>'.str_replace('HEY','',$sent); // here str_replace is used to delete a word.
http://php.flashwebhost.com/austin/day3.php
Bookmarks