Get Weather - Step 2 - Functional programming


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function getWeatherInfo($sCity)
  2. {
  3. $res = shell_exec("./getWdr.sh {$city}");
  4.  
  5. return $res;
  6. }
  7.  
  8. function convertFrToC($val){
  9. return (($val+40)*5/9)-40;
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.