i have this code
$courses = array("name_lic", "name_mes", "name_dou");
如果已经定义了name_lic, name_mes, name_douc
,我该如何将它们添加到数组中?
例如:如果已经定义了name_lic
,则将其插入数组中;如果未定义或为空,则不插入name_mes
,同样也不插入name_dou
。
基本上,数组中只能包含已定义的字符串。
在我的示例中应该是这样的:
$courses = array("name_lic");
$_POST
数组中存在吗?” - Phil