|
-
Oct 1st, 2002, 11:58 AM
#1
Thread Starter
Member
????????????????(i am a big fglah) no one ask what a fglah is ok??
how i can do x =x+1
plase
ÈÏßã ÊÚÑÝæÇ Ôæ ãÚäÇ ÝÌáå
-
Oct 1st, 2002, 11:59 AM
#2
-
Oct 1st, 2002, 12:00 PM
#3
Stuck in the 80s
Re: ????????????????(i am a big fglah) no one asq wat is a fglah ok??
Originally posted by Aiman
how i can do x =x+1
plase
If you're serious then:
x++;
x = x + 1;
x += 1;
If you're not, then stop being stupid.
-
Oct 1st, 2002, 12:02 PM
#4
Thread Starter
Member
but I made this
<?
while (x<10)
{
$x=x+1;
***code****
}
?>
and I ended with a loop without a end
-
Oct 1st, 2002, 12:04 PM
#5
Stuck in the 80s
Do this:
Code:
for($i = 0; $i < 10; $i++) {
//code here
}
-
Oct 1st, 2002, 12:04 PM
#6
Stuck in the 80s
or, if you're in love with the while loop:
Code:
$x = 0;
while ($x < 10) {
$x++;
//code here
}
Last edited by The Hobo; Oct 1st, 2002 at 12:17 PM.
-
Oct 1st, 2002, 12:14 PM
#7
Thread Starter
Member
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
-
Oct 1st, 2002, 12:16 PM
#8
Stuck in the 80s
Code:
for($i = 0; $i < 10; $i++) {
{
$x="name" . $i;
echo $x . "<br>"; //or "$x<br>";
}
-
Oct 1st, 2002, 12:18 PM
#9
Stuck in the 80s
The period . is the concenation (sp?) string. Just like VB's &
-
Oct 1st, 2002, 12:26 PM
#10
Thread Starter
Member
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]
-
Oct 1st, 2002, 12:31 PM
#11
Thread Starter
Member
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
-
Oct 1st, 2002, 12:50 PM
#12
Stuck in the 80s
Code:
$contents = file('filename.txt');
echo $contents(count(contents) -1);
Should give you the last line of a file.
-
Oct 1st, 2002, 01:18 PM
#13
Originally posted by The Hobo
The period . is the concenation (sp?) string. Just like VB's &
Yes it is ... scarry huh? Threw me for a loop.... it's nice though.... no need to hit the shift key....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|