PHP Forum

PHP Forum (http://www.selfphp.de/forum/index.php)
-   PHP Grundlagen (http://www.selfphp.de/forum/forumdisplay.php?f=12)
-   -   Mathe mit Php (http://www.selfphp.de/forum/showthread.php?t=6284)

Driel 03.12.2003 18:44:37

Mathe mit Php
 
hi.
ich hab ne kleine Spielerei für Mathe gemacht... Diese Funktioniert leider nicht, ich weiß auch nich wieso. Also könnt ihr mir bitte kurz helfen?
PHP-Code:

echo "<div algin="center"><hr2>mathematik</hr2></div><br>";
echo 
"X-Variabel  
<form  method="
post"action="$PHP_SELF">
<input type="
text" name="x" maxlength="2">
<input type="
submit" name="enter" value="Berechnen"></form>";
if(
$enter)
{
$y1 = -0,25 $x $x;
$y2 $x;
$y3 2;
$y $y1 $y2 $y3;
echo 
$y;
echo 
"y1 = $y1<br>";
echo 
"y2 = $y2<br>";
echo 
"y3 = $y3<br>";


Auf linie 9 soll ein Fehler sein, weiß aber nich welcher, also bite helfen!
Danke, Driel

edit thema geklärt... Statt komma, punkt setzen.

chris17 03.12.2003 18:52:36

Hi Driel,

Du musst einen Punkt verwenden:

$y1 = -0.25 * $x * $x;

Grüsse

Driel 03.12.2003 19:18:05

bin selber drauf gekommen, trotzdem danke!


Alle Zeitangaben in WEZ +2. Es ist jetzt 19:46:44 Uhr.

Powered by vBulletin® Version 3.8.3 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.