如何使用单个echo语句显示一行语句在3行中打印?

Here is my code

PHP

<?php
    $count1 = $obj->getDatef();
    $as1 = $count1 + 6;
    $startdate = date('d/m/Y', strtotime($count1 . ' days'));
    $enddate = date('d/m/Y', strtotime($as1 . ' days'));

    echo "<script type='text/javascript'>";
    echo "alert('Current Timesheet period($startdate (Mon) ~ $enddate (Sun)) of 
              $pcode has been successfully Updated....!')";
    echo "</script>";
    echo "<script type='text/javascript'>";
    echo "window.location='my_tm.php'";
    echo "</script>";
?>

Here it have to print like this.....

Current Timesheet period

$startdate (Mon) ~ $enddate (Sun) of $pcode

has been successfully Updated....!

There are two way the most popular is to use at the end of your echo to break line. Or you could use
tag which is less efficient as it will add markup to you page.

An example would be

echo("im line one 
 im line two
 im line three");

this will out put

im line one
im line two
im line three
echo "alert('Current Timesheet period

             $startdate (Mon) ~ $enddate (Sun) of $pcode

             has been successfully Updated....!')";

And here is the fiddle

echo "alert('Current Timesheet period
$startdate (Mon) ~ $enddate (Sun) of $pcode
 has been successfully Updated....!')";