|
Posted by Rik on 12/18/06 23:29
toffee wrote:
> Excel spreadsheet not CSV
PHP -> excel if not CSV is not very reliable. Allthough, for simple sheets
with only data it usually works fine.
BTW: Please use usenet as intended: indeed quote the (important part of)
message you are responding to, and put you answer _below_ it. Possibly
seperating lines as I'm doing now to respond to different parts.
> the extra thousand could be due to fact i have 4 decimals setup in
> mysql table.
>
> is there a way in PHP to detect whether it's a dutch locale?
On the server, indeed, provided it's indeed configured as dutch. It's
highly dependant on the platform though, as it uses it's specific locales,
which are not an internal part of PHP. See the description and comments on
http://nl2.php.net/manual/en/function.setlocale.php. If it's configured to
use dutch numbers (or any numbers), you can check formatting of numbers
with localeconv(), and format your data accordingly.
If it's just one server, and you just want to know the visitors country,
possibilities to find out wether or not it's a cloggie are numerous allbeit
varying in reliability. You could check the HTTP_ACCEPT_LANGUAGE header for
instance, the dns they're coming from, something like GeoIP, or just ask
them.
> maybe
> then i could just format the numbers to strip the decimals
A possibillity, but I doubt they'll be pleased with the loss of data :-)
--
Rik Wasmus
Navigation:
[Reply to this message]
|