My Code:
$transactions->newSet = implode("@s@",$item['pattern']);
Array Value of pattern object from json Being Passed:
Array
(
[0] => /="\something\\//
[1] => /something\\?t[p]/
)
Error:
PHP Notice 'yii\base\ErrorException' with message 'Array to string conversion'
I am trying to import data from json file and being end up with this error.
Thanks in Advance.
UPDATE:
JSON DATA:
[
{
"description": "old_text_id = 2",
"pattern": [
"\/something\/",
"\/something\?t[p]\/"
],
"severity": 0,
"type": 1,
"id": 1,
"name": {
"subFamily": "fam",
"variant": "0"
}
}]
Var_dump Result:
array(2) {
[0]=>
string(30) "/something/"
[1]=>
string(71) "/something\?t[p]/"
}
PHP Notice 'yii\base\ErrorException' with message 'Array to string conversion'