我正在创建CDT函数,但是在使用条件执行条件验证之后,如果我将数据分配给变量$ vector,这些字符串是我有此错误的字符串,则我具有三个模块,即形式,操作,函数
function CDT($montoCDT, $nombrec, $email, $time) { if ($montoCDT >= 1000000) { if ($time == 1) { $vector = ['Ganancia equivale a'] = "el 3.5%"; //in this line the error is marked } elseif ($time == 2) { $vector = ['Ganancia equivale a'] = "el 4.0%"; } elseif ($time == 3) { $vector = ['Ganancia equivale a'] = "el 4.8%"; } } else { echo "No se puede abrir el CDT debe ingresar un monto mayor o igual a $1.000.000"; } return $vector;}
该函数应首先验证$montoCDT
May到1,000,000,如果是,则比较是否是1到3个月才能收到消息(如果是3到6,是否是6到12,最后是值小于1,000,000)显示一条消息,提示您无法打开CDT
潇潇雨雨