troubleshooting Question

Parsing Error when using heredoc

Avatar of Overthere
Overthere asked on
PHP
10 Comments2 Solutions82 ViewsLast Modified:
I have a snippet of coding, PHP v5.5, that keeps giving the following error:
Parse error: syntax error, unexpected '<<' (T_SL)

I checked for whitespaces and I have started the coding on a new line after issuing the <<<ONSELECTROW
I can't seem to resolve this parsing error.
Any help appreciated..


               $dg -> set_pagesize(10);
               $dg -> add_event("jqGridSelectRow", $onSelectRow);

               $onSelectRow = <<<ONSELECTROW 
                       function(status,rowid)
                            } 
                               var $bnbr = $('#Buildings').jqGrid('getCell',rowid,'BldNbr');
                               header ('Location: bldgprofile.php' . '?' . '$bnbr=' . BldNbr);
                             }
                        ONSELECTROW;

               $dg->display();   
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros