我从我的 .php 文件中获取内容并希望将其推送到一个数组中,获取的结果类似于:
//english error
$lang['error_incorrect_login'] = "The username or password doesn't match. Please try again";
$lang['error_user_exist'] = "The Username already exist in database. Please try using a different Username";
$lang['error_email_exist'] = "Email address already exist in database";
这是我的 .php 文件的实际内容
我需要像这样的结果数组:
array(
['error_incorrect_login'] = "The username or password doesn't match. Please try again",
['error_user_exist'] = "The Username already exist in database. Please try using a different Username",
['error_email_exist'] = "Email address already exist in database"
);
我实际上想解析
$lang['error_incorrect_login'] = The username or password doesn't match. Please try again";
语句的类型并推入类似的数组。
array(
['error_incorrect_login'] = "The username or password doesn't match. Please try again",
['error_user_exist'] = "The Username already exist in database. Please try using a different Username",
['error_email_exist'] = "Email address already exist in database"
);