NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
heredoc not working. please help


Joined: 18 Feb 2009
Posts: 1
Reply with quote
Hello

I am trying to use heredoc with Nusphere

<?php


$input = <<< END Hello END;

// $input = "This is normal string" ;

print("$input");
?>


and it complaining of

ERROR: E_PARSEsyntax error, unexpected T_SL in <filename.php5>

If I use the normal string it works fine. Does anyone has any idea how to fix this problem ?
I am also attaching the Picture of the error for reference.


View user's profileFind all posts by raja4321Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
this is just not correct HEREDOC Smile
The terminating token should be on the new line.
Please read php manual: www.php.net/heredoc

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
heredoc not working. please help
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic