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
Answer
You are using
PHP 5.3. The Array Initialization Construct:[]
will not work.
Instead, use this
approach:
$cipher->initialize(
array(
'driver'=>'openssl',
'key' => $key
)
);
No comments:
Post a Comment