how i can do x =x+1
plase
ÈÏßã ÊÚÑÝæÇ Ôæ ãÚäÇ ÝÌáå
how i can do x =x+1
plase
ÈÏßã ÊÚÑÝæÇ Ôæ ãÚäÇ ÝÌáå
... :rolleyes:
If you're serious then:Quote:
Originally posted by Aiman
how i can do x =x+1
plase
x++;
x = x + 1;
x += 1;
If you're not, then stop being stupid.
but I made this
<?
while (x<10)
{
$x=x+1;
***code****
}
?>
and I ended with a loop without a end
Do this:
Code:for($i = 0; $i < 10; $i++) {
//code here
}
or, if you're in love with the while loop:
Code:$x = 0;
while ($x < 10) {
$x++;
//code here
}
thanks a lot
well can you help me also with that **code**?
I am new to php and come from a vb enviroment
I want to do this:
for($i = 0; $i < 10; $i++) {
{
$x="name" & i
echo $x
}
the result should be
name0
name1
name2
.
.
.
name10
I hope it is clear
Code:for($i = 0; $i < 10; $i++) {
{
$x="name" . $i;
echo $x . "<br>"; //or "$x<br>";
}
The period . is the concenation (sp?) string. Just like VB's &
thank you a lot you are really a good php programer
if there is anything you need foe your forums(need<>php_code) I will try to provide it(as a little thanks:) )
if you need anything send me an e-mail: [email protected]
i want to ask you a last qustion ok??
i have a txt file in the text file i add a line
11561
2121151
3212
42318541
521
612646842184
7212132131651316131354651613
8321321
....
I want to load the last line and delete it(you may read this question once before my friend asked it) plz hlp:confused:
Should give you the last line of a file.Code:$contents = file('filename.txt');
echo $contents(count(contents) -1);
Yes it is ... scarry huh? Threw me for a loop.... it's nice though.... no need to hit the shift key....Quote:
Originally posted by The Hobo
The period . is the concenation (sp?) string. Just like VB's &
:D