dollarend-error
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
$tekst = (isset($_POST['tekst'])) ? $_POST['tekst'] : '';
echo '<form method="post" action="">';
echo '<textarea name="tekst" rows="10" cols="80">';
echo htmlentities($tekst);
echo '</textarea><br/>';
echo '<input type="submit" value="Check">';
echo '</form>';
$check = array('(' => substr_count($tekst, '('), ')' => substr_count($tekst, ')'),
'{' => substr_count($tekst, '{'), '}' => substr_count($tekst, '}'),
'[' => substr_count($tekst, '['), ']' => substr_count($tekst, ']'),
"'" => substr_count($tekst, "'"), '"' => substr_count($tekst, '"'));
foreach($check as $key => $value)
{
echo $key . ' => ' . $value . '<br/>';
}
?>
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
$tekst = (isset($_POST['tekst'])) ? $_POST['tekst'] : '';
echo '<form method="post" action="">';
echo '<textarea name="tekst" rows="10" cols="80">';
echo htmlentities($tekst);
echo '</textarea><br/>';
echo '<input type="submit" value="Check">';
echo '</form>';
$check = array('(' => substr_count($tekst, '('), ')' => substr_count($tekst, ')'),
'{' => substr_count($tekst, '{'), '}' => substr_count($tekst, '}'),
'[' => substr_count($tekst, '['), ']' => substr_count($tekst, ']'),
"'" => substr_count($tekst, "'"), '"' => substr_count($tekst, '"'));
foreach($check as $key => $value)
{
echo $key . ' => ' . $value . '<br/>';
}
?>