我有一个变量$accountNumber
,它得到一个这样的数组:
我想从这个数组中获取accountNumber字符串,并将其放在另一个名为$ ac的变量中。
基本上我想要实现的是 $ ac将有字符串fi4240553120051164所以我可以将它传递给我的数据库。
基本上代码就像
$accountNumber = $bankReport->getAccountNumbersVerified();
// Now get the accountNumber string from $accountNumber and put it into $ac
$ac = //code here
答案 0 :(得分:1)
非常简单。
$ac = $accountNumber[0]->accountNumber;