1
So PhpStorm Echo gibt mir einen ‚erwartete Aussage‘ Fehler nach der folgenden Zeile:‚Erwartung der Aussage‘ nach
echo $values;
Hier ist der Teil im Code:
<?php
if(!empty($_POST)){
$values = implode(', ', array_intersect_key($_POST, $boxes));
$txt = $_POST['Zoeken'];
echo $values;
?>
<br>
<?php
echo $txt;
}
?>
und dies ist die komplette Code (Formular):
<div id="filterList">
<?php $boxes = [
'first_name' => ['label' => 'Voornaam', 'value' => 'a_Voornaam'],
'last_name' => ['label' => 'Achternaam', 'value' => 'a_Achternaam'],
'address' => ['label' => 'Adres', 'value' => 'a_Adres'],
'city' => ['label' => 'Plaats', 'value' => 'a_Woonplaats'],
'zipcode' => ['label' => 'Postcode', 'value' => 'a_Postcode'],
]; ?>
<form name="filter" style="float:left;" method="post">
<table>
<?php foreach ($boxes as $name => $box) { ?>
<tr>
<td>
<label><?php echo $box['label']; ?>:</label>
</td>
<td>
<input type="checkbox" name="<?php echo $name; ?>" id="inh" value="<?php echo $box['value']; ?>"/>
</td>
</tr>
<?php } ?>
<tr>
<td>
<label>Zoeken</label>
</td>
<td>
<input type="text" name="Zoeken" />
</td>
</tr>
<tr>
<td>
<label style="margin-top:5px;"></label>
</td>
<td>
<input id="submitfilter" type="submit" style="margin-top:5px;" class="btn"/>
</td>
</tr>
</table>
<?php
if(!empty($_POST)){
$values = implode(', ', array_intersect_key($_POST, $boxes));
$txt = $_POST['Zoeken'];
echo $values;
?>
<br>
<?php
echo $txt;
}
?>
</form>
</div>
Was könnte der Grund für den Fehler sein?
Dies tat es! Danke, ich wusste, dass es etwas sehr kleines sein müsste. – Wessah
Diese Art von Sache kann Sie batty fahren – RiggsFolly