И снова помощь кодеров)

.grom.

Member
Messages
24
Reputation
6
Reaction score
8
Points
3
Собсно нуждаюсь в помощи)
Имеется текстовый документ, в нем информация такого вида:
Code:
-------------------------
Array
(
    [mysubmit] => submitme
    [billing_fname] => Curley 
    [billing_lname] => Johnson
    [billing_address1] => 10605 SW 152nd Terr
    [billing_address2] => 
    [billing_city] => MIAMI
    [billing_state] => FL
    [billing_zip] => 33157
    [billing_country] => US
    [billing_phone] => 305-305-1448
    [shipping_fname] => Curley 
    [shipping_lname] => Johnson
    [shipping_address1] => 10605 SW 152nd Terr
    [shipping_address2] => 
    [shipping_city] => MIAMI
    [shipping_state] => FL
    [shipping_zip] => 33157
    [shipping_country] => US
    [shipping_phone] => 305-305-1448
    [shipping_option] => 3
    [autoship_status] => monthly
    [billing_cc_type] => Visa
    [billing_cc_num] => 4494355101126210
    [billing_cc_month] => 01
    [billing_cc_year] => 2014
    [billing_cc_csc] => 923
    [email_address] => [email protected]
    [guest_email_address] => [email protected]
    [ImageCode] => vo8gz
    [update] => Step 7: preview order >
    [PHPSESSID] => jpjbjmudb4c9oouq6trumq9073
    [_pk_id_2_8f41] => 0fa20df53170238b.1322663103.1.1322663107.1322663103.
    [_pk_ses_2_8f41] => *
    [__utma] => 188840831.1598721020.1322663100.1322663100.1322663100.1
    [__utmb] => 188840831.3.10.1322663100
    [__utmc] => 188840831
    [__utmz] => 188840831.1322663100.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
)

-------------------------

-------------------------
Array
(
    [mysubmit] => submitme
    [billing_fname] => Lol 
    [billing_lname] => Lolovich
    [billing_address1] => 52nd Terr
    [billing_address2] => 
    [billing_city] => New York
    [billing_state] => NY
    [billing_zip] => 31555
    [billing_country] => US
    [billing_phone] => 201-201-1448
    [shipping_fname] => Curley 
    [shipping_lname] => Johnson
    [shipping_address1] => 10605 SW 152nd Terr
    [shipping_address2] => 
    [shipping_city] => MIAMI
    [shipping_state] => FL
    [shipping_zip] => 33157
    [shipping_country] => US
    [shipping_phone] => 305-305-1448
    [shipping_option] => 3
    [autoship_status] => monthly
    [billing_cc_type] => Visa
    [billing_cc_num] => 4494521478926210
    [billing_cc_month] => 08
    [billing_cc_year] => 2013
    [billing_cc_csc] => 882
    [email_address] => [email protected]
    [guest_email_address] => site.com
    [ImageCode] => vo8gz
    [update] => Step 7: preview order >
    [PHPSESSID] => jpjbjmudb4c9oouq6trumq9073
    [_pk_id_2_8f41] => 0fa20df53170238b.1322663103.1.1322663107.1322663103.
    [_pk_ses_2_8f41] => *
    [__utma] => 188840831.1598721020.1322663100.1322663100.1322663100.1
    [__utmb] => 188840831.3.10.1322663100
    [__utmc] => 188840831
    [__utmz] => 188840831.1322663100.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
)

-------------------------

Собсно нужен парсер или ченить такое что бы данные сохранялись в таком виде в другом текстовом документе
Нужны данные из строк:
Code:
    [billing_fname] => Curley 
    [billing_lname] => Johnson
    [billing_address1] => 10605 SW 152nd Terr
    [billing_address2] => 
    [billing_city] => MIAMI
    [billing_state] => FL
    [billing_zip] => 33157
    [billing_country] => US
    [billing_phone] => 305-305-1448
    [billing_cc_type] => Visa
    [billing_cc_num] => 4494355101126210
    [billing_cc_month] => 01
    [billing_cc_year] => 2014
    [billing_cc_csc] => 923
Сохранятся должны так:

Curley Johnson|10605 SW 152nd Terr|MIAMI|FL|33157|US|305-305-1448|Visa|4494355101126210|01/2014|923
Lol Loclovich|52nd Terr||NY|31555|US|201-201-1448|Visa|4494521478926210|08/2013|882

По сути тут ничего сложно) собсно если кто может) замутите плз) заранее спс!
 

martse

RIPPER
Messages
52
Reputation
6
Reaction score
7
Points
8
Гы... не проще ли было было сразу в том скрипте это сделать, стукни мне в жабу, помогу
[email protected]
и тот первый скрипт заодно переделаем.
 
Top