php syntax error in heredoc

0

I'm messing with php and nose because it gives me a syntax error within a heredoc

Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /midirectory/test.php on line 273

line 273 is:

data: [$datos_horas_pm['24-2v2'], $datos_horas_pm['23-2v2'], $datos_horas_pm['22-2v2'], $datos_horas_pm['21-2v2'], $datos_horas_pm['20-2v2'], $datos_horas_pm['19-2v2'], $datos_horas_pm['18-2v2'], $datos_horas_pm['17-2v2'], $datos_horas_pm['16-2v2'], $datos_horas_pm['15-2v2'], $datos_horas_pm['14-2v2'], $datos_horas_pm['13-2v2'], $datos_horas_am['12-2v2'], $datos_horas_am['11-2v2'], $datos_horas_am['10-2v2'], $datos_horas_am['9-2v2'], $datos_horas_am['8-2v2'], $datos_horas_am['7-2v2'], $datos_horas_am['6-2v2'], $datos_horas_am['5-2v2'], $datos_horas_am['4-2v2'], $datos_horas_am['3-2v2'], $datos_horas_am['2-2v2'], $datos_horas_am['1-2v2']],

I open the heredoc with:

echo <<<EOT

and I close it with

EOT;

without spaces or tabs at the end.

Greetings and thanks.

    
asked by Akond 31.10.2017 в 05:11
source

1 answer

0

At the beginning of the line what data is what it is? Is it a variable? I do not see the sign $ and if it is a variable then there is a sign of = and I do not see at the end of that line the closing ;

should be something like this: $ data = [$ hour_hours_pm ['24 -2v2 '], $ hour_hours_pm ['23 -2v2'], ... ] ;

Greetings.

    
answered by 31.10.2017 в 06:25