Re: Making an array from delimited data
- From: nospam@xxxxxxxxxxxxx (Shawn McKenzie)
- Date: Mon, 28 Apr 2008 14:56:19 -0500
Joe Harman wrote:
I have some data that I pull from a database that is in the following format:
-------------------------------------------------------------
Gauge Style: Auto Meter Pro-Comp
Tachometer Usage: Standard
Gauge Series: Analog
Gauge Range: 0-11,000 rpm
Gauge Diameter (in): 5 in.
Gauge Diameter (mm): 127.00mm
Sweep: Full sweep
-------------------------------------------------------------
I want the array to end up like this
--------------------------------------------------------------------------
$data['Gauge Style'] = Auto Meter Pro-Comp
$data['Tachometer Usage'] = Standard
$data['Gauge Series'] = 0-11,000 rpm
I know I can use explode on on set of data... but up do you do it line by line?
Thanks for your help
The following is one field from the db, or each line is a field or what?
Gauge Style: Auto Meter Pro-Comp
Tachometer Usage: Standard
Gauge Series: Analog
Gauge Range: 0-11,000 rpm
Gauge Diameter (in): 5 in.
Gauge Diameter (mm): 127.00mm
Sweep: Full sweep
-Shawn
.
- Follow-Ups:
- Re: [PHP] Re: Making an array from delimited data
- From: "Joe Harman"
- Re: [PHP] Re: Making an array from delimited data
- References:
- Making an array from delimited data
- From: "Joe Harman"
- Making an array from delimited data
- Prev by Date: RE: [PHP] SMS Cellular Text Messaging
- Next by Date: Re: [PHP] Re: Making an array from delimited data
- Previous by thread: Re: [PHP] Making an array from delimited data
- Next by thread: Re: [PHP] Re: Making an array from delimited data
- Index(es):
Relevant Pages
|