Working on PHP Weather

PHP Weather I’ve been working on PHP Weather today. And I have actually made some progress :-)

The print_pretty_en() function has been improved, and can now be customized by supplying the right arguments. Two arguments control the HTML-code that will be inserted in front of and after all numbers. This makes it easy to color all numbers red or do other things like that.

Another argument controls the format of the numbers. This argument can be one of these values: ‘both_metric‘, ‘both_imperial‘, ‘only_metric‘ or ‘only_imperial‘. So if it’s ‘both_imperial‘, all values will be printed with the imperial form first, and the metric second in parenthesis.

This new and substantially cooler version of PHP Weather is not quite finished, but it’s getting closer. So stay tuned! :-)

Leave a comment