Moin,
ich hab ein kleines Problem. Kann ich innerhalb von einer Echo Ausgabe eine IF Abfrage machen?
PHP
echo "<div class="abstand_preis">";
echo "<form method="post" action="">
if ($record['p_vk1'] == '' && $ps_p1 == 0):
<input type="radio" name="preis" id="".htmlspecialchars($record['p_code'])."-preis1" value="$preis1" onClick="document.getElementById('button_".htmlspecialchars($record['p_code'])."').disabled=false; document.getElementById('eigener_preis').style.display='none';">
<label for="".htmlspecialchars($record['p_code'])."-preis1">$preis1 €</label>
endif;
<input type="radio" name="preis" id="".htmlspecialchars($record['p_code'])."-preis2" value="$preis2" onClick="document.getElementById('button_".htmlspecialchars($record['p_code'])."').disabled=false; document.getElementById('eigener_preis').style.display='none';">
<label for="".htmlspecialchars($record['p_code'])."-preis2">$preis2 €</label>
[......]
Alles anzeigen
In meiner PHP Error Log steht folgendes:
PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING