Click here to Skip to main content
16,018,534 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
JavaScript
$Jahr = date('Y');
$zahl = date('n');
if (isset($_GET['vor']))
{
   echo $datum = hallo;
   echo $zahl = $zahl ++;
}
else
{
   if (isset($_GET['zurück']))
   {
      echo $datum = hallo2;
   }
   else
   {
      echo $datum = $monate[$monat]. " ". $Jahr;
   }
}

now the $zahl is always 8 (month august). I think I have to convert it to a string for count
Posted
Updated 24-Aug-12 10:09am
v4

if you want to do numerical operation on a number you need not to change it to string.
change your code like this:
C++
$zahl++;
echo $zahl;


other wise, it will first print and then do the incremental.
 
Share this answer
 
Comments
Chi Ller 5-Sep-12 15:40pm    
No that´s not right. I don´t know how I finally had sucsess but I didn´t change the code like this and it works
 
Share this answer
 
Comments
Chi Ller 11-Aug-12 14:09pm    
The first link I already tried before, the second doesn´t help and the code in the last one returns me an Error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900