Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
PHP
$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 $zahl is always 8 (month august). I think I have to convert it to a string for count
Posted
Updated 12-Aug-12 5:05am
v2
Comments
helmi77 11-Aug-12 13:43pm    
What exactly are you trying to achieve and where's the problem?
Chi Ller 11-Aug-12 14:17pm    
it´s part of a calendar. i try to change the month on the display
Mohibur Rashid 11-Aug-12 13:45pm    
Your question does not make sense. $zahl is already integer, how counting would help if you convert to string?
Chi Ller 11-Aug-12 14:16pm    
but it doesn´t count. so what should i do?
Volynsky Alex 11-Aug-12 15:08pm    
Please see following articles:
http://ca3.php.net/manual/en/function.date.php
http://stackoverflow.com/questions/10569053/convert-datetime-to-string
http://af-design.com/blog/2010/03/13/microsoft-sql-server-driver-for-php-returns-datetime-object/

1 solution

Try it:
PHP
echo date(  "F j, Y, g:i a", strtotime( $datetime_value ) ); 
 
Share this answer
 
Comments
Chi Ller 11-Aug-12 15:52pm    
Doesn´t work... the number is now 1 and doesn´t change its value

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