Re: [PHP] how do I use and lt with eval()?

2001-11-01 Thread John A. Grant
xxx ?php somefunc(yyy,3); ? zzz'; eval(?$string); echo hello; is equivalent to: ?xxx ?php somefunc(yyy,3); ? zzz echo hello; So why doesn't it treat echo hello as HTML code in pass-through mode? In fact, it just prints hello. -- John A. Grant * I sp

Re: [PHP] parsing a string

2001-10-31 Thread John A. Grant
MG stuff, not just some of it. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail

Re: [PHP] parsing a string

2001-10-31 Thread John A. Grant
space+bird.gifthis is a bird This is a possibility, but it requires a bit trickier code to recognize split it. I was hoping for something easier to identify and parse, so maybe: #bird.gif|some text# That should be easy enough to find explode() -- John A. Grant * I sp

[PHP] Re: parsing a string

2001-10-31 Thread John A. Grant
\2\ alt=\\\3\, $string); echo $string; ? Great!. I love it when I see stuff like this written by someone who knows regex better than I. The ability to insert the pieces that are recognized/extracted via \1, \2 is pretty cool. Thanks. -- John A. Grant * I speak only fo

[PHP] how do I use and lt with eval()?

2001-10-31 Thread John A. Grant
; } } $string='xxx ?php somefunc(yyy,3); ? zzz'; eval($string); ? but I get Parse error: parse error in eval.php(11) : eval()'d code on line 1 Do I have to use lt; and gt; in place of ? I tried several combinations, but I still get the same error. -- John A. Grant * I

[PHP] how to pass true/false or no argument

2001-10-29 Thread John A. Grant
not passed? Do I use isset()? Do I use ===? Thanks. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- PHP General Mailing List (http

[PHP] Re: how to pass true/false or no argument

2001-10-29 Thread John A. Grant
John A. Grant [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... [...] How do I distinguish between false and $xxx parameter not passed? Do I use isset()? Do I use ===? Well, I guess I should have done some homework first. This code seems to w

Re: [PHP] how to recognize local or server execution?

2001-10-27 Thread John A. Grant
function getlinedelimiter() { return isonserver() ? \n : \r\n; } The pagename is critical to my site, because the code needs the page name to recognize certain suffixes and 'special page names. Perhaps it is only sufficient to test for $PHP_SELF and not $argc, but I threw in $argc==0 anyway. -- John

Re: [PHP] Re: is there a commandline php.exe interpreter?

2001-10-26 Thread John A. Grant
sponding *.html files. Thanks. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] how to recognize local or server execution?

2001-10-26 Thread John A. Grant
{ $delimiter=\n; } and then my code looks like: print hello$delimiter; How can I do this? -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here

Re: [PHP] = 0 and = 0

2001-10-25 Thread John A. Grant
s always considered better to do this: if(x) ... if(!x) ... But PHP seems to require a direct comparison with false in certain situations. Are there any cases where you need to do a direct comparison with true? Are you coming to Ottawa in the future? -- John A. Gr

[PHP] Re: is there a commandline php.exe interpreter?

2001-10-25 Thread John A. Grant
John A. Grant [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I've installed ActivePerl, which gives me a way to run .pl files, i.e. : c:\ perl someprogram.pl Does the Win32 php installation give me a command-line interpre

[PHP] Re: redirecting the browser

2001-10-24 Thread John A. Grant
a/011000/index.html The latter solution is very good because it covers all of the bases. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- PHP

Re: [PHP] how do i give optional arguments to functions??

2001-10-24 Thread John A. Grant
($image) -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL P

[PHP] is there a commandline php.exe interpreter?

2001-10-23 Thread John A. Grant
it, but it looked like it was going to just install server stuff, so I cancelled it. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- PHP General Mailing

Re: [PHP] view *.php pages locally on NT?

2001-10-21 Thread John A. Grant
about.php about.html etc. and then run a batch search/replace program on the *.html files to change all links to .php pages to link to the newly-generated pages. Is there anything like that or does the install package just configure a web server? -- John A. Grant * I speak

[PHP] parsing a string

2001-10-18 Thread John A. Grant
text around it. Any ideas are appreciated. Thanks. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- PHP General Mailing List (http://www.php.net

[PHP] accessing localtime array directly

2001-10-05 Thread John A. Grant
In Perl I have done this: $julianday=(localtime)[7]; Is there an equivalent syntax for PHP or do I just do: $now=localtime(); $julianday=$now[7]; I don't need it - I'm just curious about the syntax. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation

[PHP] Re: read file twice or read into array once?

2001-10-05 Thread John A. Grant
f memory, but I wasn't sure about whether this was ok or not in a server environment. I will use file() and investigate further if it seems slow. Thanks. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottaw

[PHP] which regexp require preg_grep() and which can be used with ereg()?

2001-10-05 Thread John A. Grant
for a blank or must I use preg_grep()or that. What specific things require preg_grep() to be used instead of ereg()? Thanks. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I

Re: [PHP] newbie - some simple questions

2001-10-04 Thread John A. Grant
m, since the directory always has an index.html, clients will never see the filename anyway and could only run it by guessing at the name, so it's a small point. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you

[PHP] read file twice or read into array once?

2001-10-04 Thread John A. Grant
=$julianday % count($lines) I appreciate that this depends on the no. of lines in the file and the size of the file. What I'm looking for is opinions on whether the use of file() is more efficient than fgets(). It needs more memory, but it eliminates reading the file twice. Thanks. -- John A. Grant

[PHP] newbie - some simple questions

2001-10-02 Thread John A. Grant
template in php so that all pages have the same appearance? I guess that's what I'm doing with my mylib.php module - the functions dump out the same nav bars to every page. Thanks. -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada