Can anyone see the error with this php code

Im new to PHP and Im getting this error
Parse error: syntax error, unexpected ‘=’, expecting ‘,’ or ‘;’ in C:\wamp\www\php_sandbox\00800 strings_functions.php on line 24
This is line 24
Trim: <?php echo fourthString = $firstString . trim($secondString); ?><br />

Thanks for any help

<html>
<head>
<title>Strings Functions</title>
</head>
<body>
<?php
$firstString="The quick brown fox";
$secondString=" jumped over the lazy dog.";
?>

<?php
$thirdString = $firstString;
$thirdString .= $secondString;
echo $thirdString;
?>

<br />
Lowercase: <?php echo strtolower($thirdString); ?><br />
Uppercase: <?php echo strtoupper($thirdString); ?><br />
Uppercase first-letter: <?php echo ucfirst($thirdString); ?><br />
Uppercase words: <?php echo ucwords($thirdString); ?><br />
<br />
Length: <?php echo strlen($thirdString); ?><br />
Trim: <?php echo fourthString = $firstString . trim($secondString); ?><br />
Find: <?php echo strstr($thirdString, "brown"); ?><br />
Replace by string: <?php echo str_replace("quick", "super-fast",$thirdString); ?><br />

</body>

</html>

View full post on Tycoon Talk

, , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Get Adobe Flash playerPlugin by wpburn.com wordpress themes


RSS Site FeedRSS Site Feed

© 1992-2011 DC2NET™, Inc. All Rights Reserved