Re: More frustration with MySQL and PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 22, 2008 9:03 AM, Eric Butera <eric.butera@xxxxxxxxx> wrote:
> That is basically it.  You're going to want to learn the why, not just
> the how though.  There is a reason for creating functions and it isn't
> just code reuse.  Think about when you want to change your export
> script.  Say you needed to add a field to it.  Right now you have to
> edit some web facing php script mixed with code that handles the
> request and connects to your database.  Wouldn't it be easier if you
> just could edit a very specific spot that was easy to get to and pop a
> column on to that instead of sifting through dozens of if statements?

    Eric's exactly right, J.  I started working with PHP about a
decade ago (yeah, I was one of the 1% or so that played around with
PHP/FI2 - and I still have a copy of it, actually).  I really didn't
appreciate functions as much as I should have until the release of
PHP4, and like Eric said, it's not just for 'reusability' - it's also
for portability, centralization, extensibility, and a whole bunch of
other great words with expansive suffixes.

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek and #1 Rated "Year's Coolest Guy" By Self Since
Nineteen-Seventy-[mumble].

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux