我有DB
的以下数据数组,如果符合条件,我想将STATUS
值更改为字符串
Array ( [0] => stdClass Object ( [ORDER] => 1321[DATE] => 2015-10-05 [TEXT] => TESTING [OTIME] => 06:03:03 [STATUS] => 3 [CODE] => ABC) [1] => stdClass Object ([ORDER] => 1321[DATE] => 2015-10-05 [TEXT] => TESTING [OTIME] => 06:03:03 [STATUS] => 3 [CODE] => ABC ) )
我想循环访问数据并执行以下操作:
if (STATUS=3) {
STATUS ="replace the number with some text";
}
答案 0 :(得分:1)
假设您的输出存储在$ results数组中,所以现在您可以迭代循环并检查如下:
new*Schedule*