note 60088 deleted from control-structures.foreach by nlopess
| From: | nlopess@php.net | Date: | Mon, 26 Dec 2005 09:31:30 +0000 |
| Subject: | note 60088 deleted from control-structures.foreach by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-100722@lists.php.net to get a copy of this message | ||
Note Submitter:
Reason: useless
----
Do you need a variable for your mySQL query? Use it;
<?php
$data = $_POST['checkbox_elements'];
foreach ($data as $value)
{
$echo .= "<li>".$value."</li>";
}
// if you want print to screen
echo $echo;
// if you want sql
$query = sprintf('INSERT INTO ... X ... Y ... Z ... %s', $echo);
// %s = $echo
?>