Ik heb de volgende error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\per3\opdracht 6\index.php on line 27
in deze simpele script:
PHP
<html>
<head>
<title>blablabla</title>
<style type="text/css">
body { background-color:cyan }
h1 { border-style: double; border-width: 10px; background-color: CornflowerBlue; text-align:center }
table { color:black; background-color:CornflowerBlue; border-style:groove; border-width:2px; border-color:black; text-align:center; position:relative; }
</style>
</head>
<body>
<h1>PHP Opdracht 6 - Array, count(), explode en implode</h1>
<?php
/*
................
*/
$auto = array(merk=>"BMW",bouwjaar=>"2010",type=>"sedan");
$string = "Waarom kan een man niet tegelijk knap en intelligent zijn?";
$array = explode(" ", $string);
$blabla = array('voetballen','basketballen','computeren','zwemmen en fietsen');
$blablabla = implode(" ", $blabla);
echo "<table align='center'>
<tr>
<td>
<table width='230'>
<tr>
<td>$auto['merk'] $auto['bouwjaar'] $auto['type']</td>
</tr>
</table>
</td>
<td>
<table width='400'>
<tr>
<td>blablablabla</br>blablablabla</br>blablablabla</td>
</tr>
</table>
</td>
<td>
<table width='230'>
<tr>
<td>$array[0]</br>$array[1]</br>$array[2]</br>$array[3]</br>$array[4]</br>$array[5]</br>$array[6]</br>$array[7]</br>$array[8]</br>$array[9]</br></td>
</tr>
</table>
</td>
<td>
<table width='230'>
<tr>
<td>$blablabla</td>
</tr>
</table>
</td>
</tr>
</table>";
?>
</body>
<!-- ............. -->
</html>
Toon Meer
Als ik de quotes weg haal krijg ik 3 andere errors:
Notice: Use of undefined constant merk - assumed 'merk' in C:\wamp\www\per3\opdracht 6\index.php on line 16
Notice: Use of undefined constant bouwjaar - assumed 'bouwjaar' in C:\wamp\www\per3\opdracht 6\index.php on line 16
Notice: Use of undefined constant type - assumed 'type' in C:\wamp\www\per3\opdracht 6\index.php on line 16
dus ik weet het ook niet meer 8-)