note 78632 added to control-structures.foreach
| From: | ArmagoSolutions at osu1 dot php dot net | Date: | Sat, 20 Oct 2007 02:20:53 +0000 |
| Subject: | note 78632 added to control-structures.foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131578@lists.php.net to get a copy of this message | ||
Re: petruzanauticoyahoo?com!ar (16-Oct-2007 04:44)
implode() accomplishes that task more succinctly.
<?php
$fields = array ( 'id', 'name', 'surname', 'email',
'phone' );
$query = implode( ', ', $fields ); // $query == 'id, name, surname, email,
phone'
?>
implode() reference: http://www.php.net/manual/en/function.implode.php
Contact info: http://www.armagosolutions.com
----
Server IP: 217.160.72.57
Probable Submitter: 203.154.74.243
----
Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php
Edit -- https://master.php.net/note/edit/78632
Del: integrated -- https://master.php.net/note/delete/78632/integrated
Del: useless -- https://master.php.net/note/delete/78632/useless
Del: bad code -- https://master.php.net/note/delete/78632/bad+code
Del: spam -- https://master.php.net/note/delete/78632/spam
Del: non-english -- https://master.php.net/note/delete/78632/non-english
Del: in docs -- https://master.php.net/note/delete/78632/in+docs
Del: other reasons-- https://master.php.net/note/delete/78632
Reject -- https://master.php.net/note/reject/78632
Search -- https://master.php.net/manage/user-notes.php