[PHP] dynamic variables in a while loop?

2003-01-15 Thread Philipp Hartmann
Hi everyone.
I am more of an ActionScript person, but I have to do this one in php.
Should
be easy for everyone familiar with php syntax...

Here is what I want to do:
I am getting several variables into a Php Script such as:

help1 = yes / no
help2 = yes / no
.
.
.
helpX = yes / no

I need to check whether the variable is true or false, and according to that
add
1 to a counter variable.

Something like this I'd do in ActionScript, but dont know about php
[CODE]
$i = 0;
While (++$i = 8) {
if ([help]+$i==yes){ // this line produces an error...
$counterYes += counterYes;
}
}
[/CODE]

Do I have to initialize all variables before I can use them in php?

Thank you very, very much for your time and your help!!
Philipp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] dynamic variables in a while loop?

2003-01-15 Thread Philipp Hartmann
Thanks everyone!
Works great!
Phil

- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: Philipp Hartmann [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 2:03 PM
Subject: Re: [PHP] dynamic variables in a while loop?


 for($ii=1; $ii20; $ii++)
 {
 $helpz = help$ii;
 if(${$helpz} == yes)
 {
 }
 else
 {
 }
 }
 - Original Message -
 From: Philipp Hartmann [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 15, 2003 6:50 AM
 Subject: [PHP] dynamic variables in a while loop?


 Hi everyone.
 I am more of an ActionScript person, but I have to do this one in php.
 Should
 be easy for everyone familiar with php syntax...

 Here is what I want to do:
 I am getting several variables into a Php Script such as:

 help1 = yes / no
 help2 = yes / no
 .
 .
 .
 helpX = yes / no

 I need to check whether the variable is true or false, and according to
that
 add
 1 to a counter variable.

 Something like this I'd do in ActionScript, but dont know about php
 [CODE]
 $i = 0;
 While (++$i = 8) {
 if ([help]+$i==yes){ // this line produces an error...
 $counterYes += counterYes;
 }
 }
 [/CODE]

 Do I have to initialize all variables before I can use them in php?

 Thank you very, very much for your time and your help!!
 Philipp


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] flash and php (using the varibles)

2003-01-09 Thread Philipp Hartmann
I didnt test this, but something along the line should work

[ActionScript]
onEnterFrame = function{
i  = dataYougetFromMySQL;
if (i  max){
this._width = this._width * (i*factor) // factor can slow down or accelerate
your animation
}
}
[/ActionScript]

hth,
Philipp


- [ Paul Ferrie ] - [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi guys i hope there is someone in here that use flsah along with php to
 help with this :)

 Anyway i will make it simple.

 mysql returns a number say 123 i want flash to take this number to animate
a
 progress bar, but here the problem it does work but the progress bar
dosn't
 animate it just sets to the hieght of the numbers sent back from mysql.
How
 can i slow down the animation of the progress bar

 Anyone



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] HTML email that generates !s - any ideas?

2003-01-08 Thread Philipp Hartmann
Hi everyone, I am new to this list, so this is my first post.

I am trying to sen dan HTML email, and so far I got everything running,
except for one very odd problem.

1.) I am setting up all my variables within the .php Script.
2.) I generate my HTML email
3.) I am outputting the email to the browser and send it to myself

-- Now here comes the problem:

In the browseroutput the text looks like I want it to be. In the email
however,
there are several EXCLAMATION MARKS (!) added to the code (and therefore
the body).
How can this happen?? Is there some trick I have missed? The exclamation
marks are
positioned within the email according to the amaount of characters I submit
with the
email.

I have set up a simple page where you can view the .php file, the output and
the email.

http://www.gsdh.org/pleasehelp/index.html

If anyone of you could spare the time, I would be really gratefull as I have
to finish this but am
stuck!  :(

Thans again,
Philipp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php