note 42555 added to function.array-map
| From: | brenda at wallace dot net dot nz | Date: | Thu, 20 May 2004 23:51:42 +0000 |
| Subject: | note 42555 added to function.array-map | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69897@lists.php.net to get a copy of this message | ||
this is useful for building insert statements.
$this->_table_name_ = "uuser";
$this->fields = array("user_id", "user_name", "user_email");
$sql ="INSERT INTO $this->_table_name_
( " . implode($this->fields, ", ") . ")
VALUES
(" . implode( array_map(array($this, "getDbValue"), $this->fields) , ",
" ) . ");";
----
Manual Page -- http://www.php.net/manual/en/function.array-map.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42555
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42555&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42555&report=yes
Search -- http://master.php.net/manage/user-notes.php