Re: executeing another files code

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

 



Ryan A wrote:

Hi again,
One last question as am a bit confused, using this method:

$s = str_replace(
array('$firstname', '$lastname', '$sitename', '$message'),
array($firstname, $lastname, $sitename, $message),$s);

do I *have to* pass 4 arguements?


you can set default values (eg an empty string) to cover that scenario. I can aslo offer you a third alternative to the very good suggestions already offereed by Marek and Sokolewicz; printf();

--
Raditha Dissanayake.
------------------------------------------------------------------
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/ | Drag and Drop Upload


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