View Single Post
Old 08-18-2009, 09:11 PM   #8 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

New challenge! Challenge 3

Given the string variable $rhyme (with the contents as below), echo that string except for the last line.

Starting Code
PHP Code:
<?php

$rhyme 
"Peter Piper picked a peck of pickled peppers;
A peck of pickled peppers Peter Piper picked;
If Peter Piper picked a peck of pickled peppers,
Where's the peck of pickled peppers Peter Piper picked?
This is the line that needs to be removed!"
;
Desired output
Peter Piper picked a peck of pickled peppers;
A peck of pickled peppers Peter Piper picked;
If Peter Piper picked a peck of pickled peppers,
Where's the peck of pickled peppers Peter Piper picked?
Go forth and solve: be creative but not silly!

Last edited by Salathe : 08-19-2009 at 02:41 PM.
Salathe is offline  
Reply With Quote