|
Posted by Marcus Bointon on 10/21/63 11:33
On 21 Nov 2005, at 15:43, Jochem Maas wrote:
> using sprintf() is
> such a simple case may be excessive BUT I was merely introducing
> the OP to
> something new (possibly) - anyone asking such 'simple' questions is
> not at a stage that this kind of efficiency is an issue (i.e. give
> them 'whats possible' before telling them 'whats best')
sprintf is also a good example of a different way of thinking about
string interpolation, and what's more it's remarkably close to the
whole concept of using prepared statements in SQL, a measure that can
gain you both speed and security, plus it's supported very nicely in
PDO in PHP 5.1. A tangent I know, but a useful one nonetheless. Hey,
and I remember when "print using" was considered a 'power user'
feature in BASIC in 1981!
Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk
[Back to original message]
|