Re: using ($test)?$true:$false in a string

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

 



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@xxxxxxxxxxxxxxxxxx | http://www.synchromedia.co.uk

--
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