note 50546 added to language.variables.external
| From: | MuratTASARSU at osu1 dot php dot net | Date: | Thu, 03 Mar 2005 00:29:27 +0000 |
| Subject: | note 50546 added to language.variables.external | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85836@lists.php.net to get a copy of this message | ||
if you want your multiple select returned variable in comma seperated form you can use this. hope
that helps. regards...
$myvariable
Array ( [0] => one [1] => two [2] => three )
turns into
one,two,three
<?php
$myvariable="";
$myseperator="";
foreach ( $_POST["myvariable"] as $v) {
if (!isset($nofirstcomma)) $nofirstcomma=0; else $myseperator=",";
$myvariable = $myvariable.$myseperator.$v;
}
echo $myvariable;
?>
----
Manual Page -- http://www.php.net/manual/en/language.variables.external.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50546
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50546&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50546&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50546&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50546&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50546&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50546&report=yes
Search -- http://master.php.net/manage/user-notes.php