note 31705 added to language.variables
| From: | daevid at daevid dot com | Date: | Wed, 30 Apr 2003 22:47:50 +0000 |
| Subject: | note 31705 added to language.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47307@lists.php.net to get a copy of this message | ||
While this may or may not be obvious, to use references with a function, do it like this...
function timeStampNotes($notes)
{
if ($notes != "")
$notes = "\n\n[".date("m/d/Y h:iA")."]"\n".$notes;
}
timeStampNotes(&$contact_notes);
notice that you use the & in the passing, not in the function itself...
If your notes are getting to be large textareas (like with a database), this may be faster than
sending it the normal way.
--
http://www.php.net/manual/en/language.variables.php
http://master.php.net/manage/user-notes.php?action=edit+31705
http://master.php.net/manage/user-notes.php?action=delete+31705
http://master.php.net/manage/user-notes.php?action=reject+31705