I'm trying to initialize a function of CI in my native code.
$cipher->initialize(
[
'driver'=>'openssl',
'key' => $key
]
);
I'm getting an error of Parse error: syntax error, unexpected '['
Can I ask how to fix this?
Using Php 5.3.3
[]
may or may not work. Try:$cipher->initialize( array( 'driver'=>'openssl', 'key' => $key ) );
instead (since you are using PHP 5.3).