Jump to content

Echo error


pandu

Recommended Posts

Could we see all your code?

its probably somewhere surrounding that line.

^

 

post the code surrounding it, as well as the actual parse error.  You are missing or have too many quotes, brackets, semicolons etc.. somewhere.  The actual error message helps tell you what it is (not) expecting.

Link to comment
Share on other sites

Here is the surrounding code. One fix is to replace the double quotes with single quotes.

if ($_GET["start_time"] != NULL){
$start_time_input = $_GET["start_time"];
$start_tz = $_GET["start_tz"];
$end_tz = $_GET["end_tz"];
putenv("TZ=$start_tz);
$start_time = strtotime($start_time_input);
echo "<strong>";   <--- Parse Error starts here. I can fix it by replacing with single quotes
echo date("h:i:sA",$start_time)."\n";  <--- Also get the parse error here if I fix the above
echo "</strong>";  <--- same parse error in this line... sigh... 
putenv("TZ=$end_tz");

 

Link to comment
Share on other sites

simple error


if ($_GET["start_time"] != NULL){



$start_time_input = $_GET["start_time"];



$start_tz = $_GET["start_tz"];



$end_tz = $_GET["end_tz"];



putenv("TZ=$start_tz"); // this line had an unclosed double quote



$start_time = strtotime($start_time_input);



echo "<strong>";   <--- Parse Error starts here. I can fix it by replacing with single quotes



echo date("h:i:sA",$start_time)."\n";  <--- Also get the parse error here if I fix the above



echo "</strong>";  <--- same parse error in this line... sigh... 



putenv("TZ=$end_tz");

 

also you don't need double quotes unless you intend on including a variable like echoing out something

 

so $name = $_GET['name'] and echo("The name is: $name");

 

Good Luck

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.