Question: I have the following string:

```
$result = "category,date,product,cost
car,10/10/2005,toyota,3000
bike,12/12/2007,yamaha,1000";

```

I need to arrange the string into the best format to insert into a database (needs to be efficient as there might be lots of data also first row will not be needed).

The string is on new lines, so I can:

```
$n = explode("\n", $result);

```

which puts it in this format:

```
[0] => category,date,product,cost
[1] => car,10/10/2005,toyota,3000
[2] => bike,12/12/2007,yamaha,1000

```

now how would i go about formatting this to insert in a db, once again the solution needs to be efficient (for performance), also I would like the first row to not be inserted and finally on the insert I wish for the date to not be inserted. 

Hope it makes sense, thanks for the help in advance.

--------edit---------------

The table (item) is structured with the following fields:

```
category, product, cost

```

thanks

Answer: 
**You can easily push a GWT app (with normal restrictions) as a Chrome extension.**

For a Start Read these -

Tutorial 1 - <http://blog.tomtasche.at/2011/08/chromegwt-building-chrome-extensions.html>

Tutorial 2 - <http://tech-drum.blogspot.in/2012/06/building-chrome-extensions-with-gwt.html>

You can also try and use this for reference - [gwt-chrome](http://code.google.com/p/gwt-chrome/)

Note - There is a [issue](http://code.google.com/p/google-web-toolkit/issues/detail?id=5577) logged against GWT for making this process easy. "Star" it please.
`The difference between a Packaged App and a Hosted App is the offline behavior`

a Packaged App is an install able application on browser and an Web App is hosted from a web server and wont offline.

But you are able to run the packaged when the browser is offline with help of .json file ..hardly calling as manifest.json

[Helloworld Packaged App](http://developer.chrome.com/apps/first_app.html)

[Chrome article on Packaged apps](http://developer.chrome.com/extensions/apps.html)

Finally you need not to use `Eclipse` to create a packaged file because all of them are normal files (.html,.js,.css......).If you want use to browse the files easily and for better maintanace you can use it .
I