A couple of questions to clarify what you are trying to do so that you'll get a better answer:
1. .enw = Sierra LandDesigner 3D Terrain Modeling format, right? Is this file in plain text or does it have a lot of markup that you need to parse and/or remove?
2. Are you trying to write a php script to put the file contents into
the mysql database or can you use a mysql frontend directly (i.e. can
you access mysql from the commandline)? Also, is this a use once thing or are you trying to set up an automatic way to process many files? Are you trying to setup a webpage where someone can upload a .enw file and you load it into a database and give them back the results or is it just for you?
If you need to display the last database entry as the first line of
the output, then the array_reverse() function might help you - here's
the description from the PHP 5.1 manual (check out the Array functions
in chapter VI of the online manual - http://www.php.net/manual/en/):
array
array_reverse ( array array [, bool preserve_keys] )
array_reverse() takes input
array and returns a new array with the
order of the elements reversed, preserving the keys if
preserve_keys is TRUE.
I hope that this helped, and when you answer these questions maybe someone can give you some useful suggestions. Good luck!
Enter your message below
Sign in or Join us (it's free).