我有这个:
$custom = var_export('return ' . self::$push_action['custom']($data), true);
这将调用此方法:
protected static function match($data) {
$match = service::$db->select('matches', 'match_id', array('user_id' => $data['user_id'], 'opponent_id' => $data['opponent_id']), 'ORDER BY match_id DESC LIMIT 1');
return array('match_id' => $match[0]['match_id']);
}
但我收到此错误:
Notice: Array to string conversion in....
如何从match($data)
方法中正确返回数组?
$custom
我需要用返回的数组填充变量。
谢谢你的帮助