'PHP Parse error: syntax error, unexpected '[', expecting ';' or ',' in ./dbdrivers/odbc.php IN $$args[1] [duplicate]
When I changed from php 5.6 to php 7.4 I am getting this error:
PHP Parse error: syntax error, unexpected '[', expecting ';' or ',' in ./dbdrivers/odbc.php IN $$args[1]
function &db_fetch_row ($args=array()){
global $$args[1];
switch(count($args)) {
case 2:
return (odbc_fetch_into($args[0], $args[1]));
default:
return (odbc_fetch_array($args[0]));
}
}
Solution 1:[1]
You have to specify either
${$args[1]}
or
${$args}[1]
https://www.php.net/manual/en/language.variables.variable.php
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Scuzzy |
