PHP PHP Basics Daily Exercise Program String Manipulation

Namazbek Bekarysuly
Namazbek Bekarysuly
882 Points

why wrong?

<?php $firstName = "Rasmus"; $lastName = "Lerdorf"; $fullName = $firstName . " " . $lastName . "\n"; echo $fullName; ?>

index.php
<?php
$firstName = "Rasmus";
$lastName = "Lerdorf";
$fullName = $firstName . " " . $lastName . "\n";
echo $fullName;
?>

1 Answer

Mustafa Başaran
Mustafa Başaran
28,018 Points

Hi Namazbek,

While creating a variable, you are not supposed to put a line break. So, combining the first two variables would b sufficient in stage 2 of this code challenge.

$fullName = $firstName . " ". $lastName; 
Namazbek Bekarysuly
Namazbek Bekarysuly
882 Points

Ohh Gosh... of course! Thanks!