[PHP] Re: source of global variable

2001-08-25 Thread Dell Coleman

I'm not sure of the problem but something like

?
if ($condition) { echo $time}
else { //do something else}
?
You can also print or echo html from php if that helps your program flow

like
?
echo Table
 TRTHtitle/TH/TR
  TRTD$data/TD/TR
  /Table;
?
Often you will want to generate the table rows in an if() or while()
statement
You can do the same thing with any html tags , javascript, etc.

Web pages are not static so pass parameters you need through url
A php trick is that a href=$PHP_SELF?params calls itself with the
parameters
you give it. This works on form action= statements too

HTH

Nafiseh Saberi wrote:

 hi.
 I write program with php,then for build table I must to close it,
 write html tag and then open php and continue,...

 I ask time in one line and in another line I want to show it.
 but I want the first line doesnot run in all condition.

 I think my problem will solve with static variables.???
 thanks.

--
Dell Coleman, Principal
PICO Technology Corp.
Victoria, BC
Email [EMAIL PROTECTED]
Web http://members.home.com/pico/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: source of global variable

2001-08-25 Thread Dell Coleman

I think I did misunderstand -- php is not like C where you declare things
global
both in the main program and in subroutines. If you are not in a function
everything is
automatically global; in php functions you need to declare variables to be
global.
--so you don't need it

the problem looks like the call to strtotime('now')
see http://www.php.net/manual/en/function.strtotime.php
for the proper usage





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]