Jump to content
Larry Ullman's Book Forums

Alpha

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Alpha

  1. Hi there. Completely new to php, working my way through the book. Whilst I got this script to work (Script 3.10), I don't quite understand why it works/worked.

     

    In the calculate_trip_cost function, I don't understand how it gets values for the $miles, $mpg and $ppg arguments. They are only defined within the function (which I think might have something to do with Variable Scope, mentioned a couple of pages later), and don't appear to be getting data from the form.

     

    If somebody could take the time to explain this to me, I'd be hugely appreciative. Thanks in advance!

×
×
  • Create New...