PHP Parse error: syntax error, unexpected '[', expecting ';' or ',' in ./dbdrivers/odbc.php IN $$args[1]
You have to specify either
${$args[1]}
or
${$args}[1]
https://www.php.net/manual/en/language.variables.variable.php
What's wrong? PHP Parse error: syntax error, unexpected '}', expecting ',' or ';' in
You missed ;
. Each statement must ends up with a semicolon in PHP.
How to fix Parse error: syntax error, unexpected ')', expecting '['?
Name the category variable properly
@forelse ($categories as $category)
Hope this helps
Parse error: syntax error, unexpected '=', expecting ',' or ';'
This should be
<?php
global $url = "/blog-1/index.html"; //no need of global here
if ($_SERVER['HTTP_REFERER'] == $url)
{
header('Location: /blog-2/index.html');
exit();
}
?>
if ($_SERVER['HTTP_REFERER'] == global $url) {
here global $url
is the culprit
Fatal error - Parse error: syntax error, unexpected ':', expecting - Wordpress
The version of ACF you're using requires PHP 7.0+. The error message you're getting indicates you're using PHP 5.6 or older. You should talk to your hosting provider about allowing you to upgrade to newer version of PHP.
This error specifically is caused by a new PHP method declaration syntax introduced in PHP 7.0 that allows you to declare that the method you're defining will return an array, which you can read about here: http://php.net/manual/en/functions.returning-values.php#functions.returning-values.type-declaration
If your hosting provider won't upgrade your PHP version, I suggest you find a new hosting provider. But if you need ACF to work in the meantime, you can go to the advanced page for ACF in the repository and download an older version at the bottom of the page.
Note: Both of these practices (using an outdated PHP version and using an outdate plugin) can be detrimental to the long-term health of your WordPress installation. I'd recommend getting on to PHP 7.2 at least as soon as you're able, which will allow you to use the most recent version of ACF.
Related Topics
Prevent Direct Url Access to PHP File
New Csrf Token Per Request or Not
How to Remove the Url Protocol and Slash from User Input in PHP
How to Solve Time Out in PHPmyadmin
Using the PHP Http_Accept_Language Server Variable
Best Practice: Import MySQL File in PHP; Split Queries
Include Files from Parent or Other Directory
How to Get Greenwich Mean Time in PHP
Run Cron Job on PHP Script, on Localhost in Windows
PHP Function Use Variable from Outside
Save PHP Variables to a Text File
Parsing JSON Array with PHP Foreach
Getting Actual Value from PHP Simplexml Node
How to Delete MySQL Row After Time Passes
PHP Printed Boolean Value Is Empty, Why
Parse Error: Syntax Error, Unexpected '(', Expecting ',' or ';' In