Syntax error, where?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello again;
In my frustration and laziness (tired of probing around to solve syntax errors that are not obvious)
I have encountered the following error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in <path removed> groups_proc.php on line 585

The two lines immediately proceeding the line referenced by the error and line 585 follow:

line 583: $pending_to = str_replace("//\$requests_to[] = ' ';", "\$requests_to[$list_length] = '$input[4]';\n//\$requests_to[] = ' ';", $pending_to); line 584: $pending_to = str_replace("//\$r_group_to[] = ' ';", "\$r_group_to[$list_length] = '$input[3]';\n//\$r_group_to[] = ' ';", $pending_to); line 585: $pending_to = str_replace("//\$r_status_to[] = ' ';", "\$r_status_to[$list_length] = 'pend';\n//\$r_status_to[] = ' ';", $pending_to); <- error reference line

I can't see it. The only problem I would imagine, is that $list_length is an integer and not a string. But if that was what is being complained about,
why didn't the error occur at line 583?
(
I am trying to add array items to a php file by writing them to it. $list_length is a variable declared in the file to keep track of what index to assign to new array items. It is incremented when an item is added. The reason is that there are 3 arrays and all have to correlated item for item. Yes there probably is a better way but this is what I have to deal with at present.
)

Thanks for help in advance
Jeff K

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux