Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ php

im creating a custom shipping method for opencart, however i am stuck on the catalog model file, which is for PHP 5.4+, but how do i make it working with PHP 5.3 as Opencart Requirement is start from PHP 5.3

catalog/model/shipping/items.php

    $languages = $this->language->get('code');
    $quote_data = array();
    $quote_data['items'] = array(
        'code'         => 'items.items',
        'title'        => $this->config->get('items_shipping_description')[$languages],
        'cost'         => $this->config->get('items_cost'),
        'tax_class_id' => $this->config->get('items_tax_class_id'),
        'text'         => $this->currency->format($this->tax->calculate($items_cost, $this->config->get('items_tax_class_id'), $this->config->get('config_tax')))
    );

this line working fine with PHP 5.4+ but not PHP 5.3

'title'        => $this->config->get('items_shipping_description')[$languages],

i get an error for PHP 5.3 which is

Parse error: syntax error, unexpected '[', expecting ')' in ...

i’ve also read many duplicate question and tried many different way to make this working with no luck! please help, thank you!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s