来自查询的内爆数组结果

时间:2016-12-01 09:35:08

标签: php

美好的一天,我正在尝试implode这个结果

Array
(
    [0] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-684
            [LineNo] => 1000
            [ItemCode] => MWFS15121391
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [1] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-685
            [LineNo] => 2000
            [ItemCode] => MWFS15121392
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [2] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-686
            [LineNo] => 3000
            [ItemCode] => MWFS15121393
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 2.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [3] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-687
            [LineNo] => 4000
            [ItemCode] => MWFS15121394
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [4] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-688
            [LineNo] => 5000
            [ItemCode] => MWFS15121370
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 3.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [5] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-689
            [LineNo] => 6000
            [ItemCode] => MWFS15121371
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 3.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [6] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-690
            [LineNo] => 7000
            [ItemCode] => MWFS15121372
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 3.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [7] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-691
            [LineNo] => 8000
            [ItemCode] => MWFS15121373
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [8] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-692
            [LineNo] => 9000
            [ItemCode] => MWFS15121367
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [9] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-693
            [LineNo] => 10000
            [ItemCode] => MWFS15121369
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 2.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [10] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-694
            [LineNo] => 11000
            [ItemCode] => MWFS15121766
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [11] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-695
            [LineNo] => 12000
            [ItemCode] => MWFS15121768
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 2.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [12] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-696
            [LineNo] => 13000
            [ItemCode] => MWFS15121297
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [13] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-697
            [LineNo] => 14000
            [ItemCode] => MWFS15121769
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [14] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-698
            [LineNo] => 15000
            [ItemCode] => J050330305
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 3.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [15] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-699
            [LineNo] => 16000
            [ItemCode] => MWFS15121728
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [16] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-700
            [LineNo] => 17000
            [ItemCode] => MWFS15121696
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [17] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-701
            [LineNo] => 18000
            [ItemCode] => MWFS15121700
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 3.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

    [18] => stdClass Object
        (
            [TransactionNo] => DOD-DI-M-MCKL-702
            [LineNo] => 19000
            [ItemCode] => MWFS15121768
            [TMP_DeliveryOrderTransNo] => DO-DI-M-MCKL-5
            [ExtraRemark] => 
            [ExtraRemark2] => 
            [Quantity] => 1.00000000000000000000
            [UOMCode] => PAIR
            [CreatedDate] => 2016-09-15 16:11:06.970
            [CreatedBy] => accounting
            [ModifiedDate] => 2016-09-15 16:11:06.970
            [ModifiedBy] => accounting
        )

这是我到目前为止所尝试的

$LineNo             =  implode(';', $fromTMPdoDetail->LineNo) . ';';
                $ItemCode           =  implode(';', $fromTMPdoDetail->ItemCode) . ';';
                $ExtraRemark        =  implode(';', $fromTMPdoDetail->ExtraRemark) . ';';
                $ExtraRemark2       =  implode(';', $fromTMPdoDetail->ExtraRemark2) . ';';
                $Quantity           =  implode(';', $fromTMPdoDetail->Quantity) . ';';
                $QuantityReceived   =  implode(';', $recv_qty) . ';';
                $UOMCode            =  implode(';', $fromTMPdoDetail->UOMCode) . ';';
                $ExtraRemarkReceive = implode(';', $fromTMPdoDetail->UOMCode) . ';';

然后我再次尝试使用foreach

foreach($fromTMPdoDetail as $newfromTMPdoDetail){
                $LineNo             =  implode(';', $newfromTMPdoDetail->LineNo) . ';';
                $ItemCode           =  implode(';', $newfromTMPdoDetail->ItemCode) . ';';
                $ExtraRemark        =  implode(';', $newfromTMPdoDetail->ExtraRemark) . ';';
                $ExtraRemark2       =  implode(';', $newfromTMPdoDetail->ExtraRemark2) . ';';
                $Quantity           =  implode(';', $newfromTMPdoDetail->Quantity) . ';';
                $QuantityReceived   =  implode(';', $recv_qty) . ';';
                $UOMCode            =  implode(';', $newfromTMPdoDetail->UOMCode) . ';';
                $ExtraRemarkReceive = implode(';', $newfromTMPdoDetail->UOMCode) . ';';
            }

他们两个都给我这个错误

  

消息:implode():传递的参数无效

这就是我想要实现的目标

$LineNo = '1000;2000;300'
抱歉英语不好。我的php版本5.6.1

0 个答案:

没有答案