|
Posted by lorento on 06/26/06 11:25
Hmm..instead use sprintf or concatenate the string its better you
creating variable first.
$date_order = date ("F j, Y");
$dt = "The order was sent $date_order. Please make a note of it";
The concatenate method is faster then other methods but its difficult
to maintain.
The sprintf() function is slowest among this methods.. its better use
sprintf() if you want format complex string.
Read this : http://www.zend.com/zend/art/mistake.php
---
http://blog.deshot.com
http://www.mastervb.net
Janwillem Borleffs wrote:
> ImOk wrote:
> > or do I have to create a variable first or concatenate the string.
> >
>
> Besides creating a variable first, you have the following options:
>
> $dt = 'The order was sent ' . date('F j, Y') . '. Please make a note of
> it';
>
> $dt = sprintf('The order was sent %s. Please make a note of it', date('F j,
> Y'));
>
>
> JW
Navigation:
[Reply to this message]
|