0
私は非常に小さな問題がありますが、これを解決できません。私は他のフィールドがあるので配列部の問題点
Array
(
[0] => Array
(
[0] => Array
(
[Asset Address 1 Label] => asas
[Asset Address 1 Organization] =>
[Asset Address 1 Name prefix] =>
[Asset Address 1 First name] => asas
[Asset Address 1 Middle name] => asasas
[Asset Address 1 Last name] => asasa
[Asset Address 1 Name suffix] => asasa
[Asset Address 1 Street] => asasa
[Asset Address 1 Street 2] =>
[Asset Address 1 Zip/Postal Code] => 121212
[Asset Address 1 City] =>
[Asset Address 1 State] =>
[Asset Address 1 State Combined code] => AO-CUS
[Asset Address 1 Country ISO2 code] => AO
[Asset Address 1 Types 1 Name] => billing
[Asset Address 1 Types 2 Name] => shipping
)
[1] => Array
(
[Asset Address 2 Label] =>
[Asset Address 2 Organization] =>
[Asset Address 2 Name prefix] =>
[Asset Address 2 First name] =>
[Asset Address 2 Middle name] =>
[Asset Address 2 Last name] =>
[Asset Address 2 Name suffix] =>
[Asset Address 2 Street] =>
[Asset Address 2 Street 2] =>
[Asset Address 2 Zip/Postal Code] =>
[Asset Address 2 City] =>
[Asset Address 2 State] =>
[Asset Address 2 State Combined code] =>
[Asset Address 2 Country ISO2 code] =>
[Asset Address 2 Types 1 Name] =>
[Asset Address 2 Types 2 Name] =>
)
)
)
に注意してください、アレイ内の別の次元に内部資産アドレス1 & 2を破るしようとしています
Array
(
[0] => Array
(
[Asset Address 1 Label] =>
[Asset Address 1 Organization] =>
[Asset Address 1 Name prefix] => Hotel Taj
[Asset Address 1 First name] => Maan
[Asset Address 1 Middle name] => Singh
[Asset Address 1 Last name] => Hotel
[Asset Address 1 Name suffix] =>
[Asset Address 1 Street] =>
[Asset Address 1 Street 2] =>
[Asset Address 1 Zip/Postal Code] => 110020
[Asset Address 1 City] =>
[Asset Address 1 State] =>
[Asset Address 1 State Combined code] => IN-DL
[Asset Address 1 Country ISO2 code] => IN
[Asset Address 1 Types 1 Name] => billing
[Asset Address 1 Types 2 Name] =>
[Asset Address 2 Label] => Himachal
[Asset Address 2 Organization] =>
[Asset Address 2 Name prefix] =>
[Asset Address 2 First name] => Hotel
[Asset Address 2 Middle name] =>
[Asset Address 2 Last name] => Taj
[Asset Address 2 Name suffix] =>
[Asset Address 2 Street] =>
[Asset Address 2 Street 2] =>
[Asset Address 2 Zip/Postal Code] => 110020
[Asset Address 2 City] =>
[Asset Address 2 State] =>
[Asset Address 2 State Combined code] => IN-CT
[Asset Address 2 Country ISO2 code] => IN
[Asset Address 2 Types 1 Name] => shipping
[Asset Address 2 Types 2 Name] =>
)
)
:
私は、次の配列を持っています上に表示されていない配列なので、次のように正規表現を使用してフィルタリングしてみる必要がありました。
問題:
これは$oldkey
が0であるとき、それはスキップされ、$oldkey1
のために働く基本的には、配列の最初から機能していません。どうして?
また、このメソッドを使用すると、私は別の配列を作成しています。既存の配列内に余分な次元を持つようにしようとしています。
私はうまく説明したと思います。
'$ oldkey'が' 0'の場合、正規表現は '/(Asset Address)[0] [\ w] + /'になります。 '0'の配列キーはありますか? – Deadooshka
ああ、どれほど愚かなのよ、$ oldkey + 1を追加して、資産アドレス1と2の両方を受け入れ始めました。ありがとう! – Aayush
@Deadooshka問題1は、既存のアドレスフィールドを同じ配列内の多次元配列にどのように置き換えることができるかについてのあらゆるアイデアを解決しましたか? – Aayush