Hello,
I've been toying around, lately, with using PHP's DOM API
(specifically, domxml because I'm still using PHP4) for doing some of my
server side dynamic pages, instead of the 'classic' method of outputting
a serial stream of html dynamically generated with, e.g. php print()
statements.
I sent this to the original user, but forgot to CC it to the list. I'm just
sending this now, for completeness.
- Original Message -
From: Jeff Schmidt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 25, 2005 5:10 PM
Subject: Re: [PHP] Problem with arrays
Hello there.
Well
be to use
the in_array construct, which tests to see if the first value is in the
array specified as the second value.
if (in_array($name, array(jim, andrea, bob)))
{
//code here
}
Jeff Schmidt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I would be tempted to do the following.
First, I would setup the html form so that the text boxes are named
something like 'age[Andrea]', 'age[Bob]', etc. When the form submitted,
this will give you an array, accessible as $_POST['age'] (or
$_GET['age'] depending on whether you used POST or GET
to make sure they are legal, and in the correct format,
and then assign them individually, as before.
Jeff
Jeff Schmidt wrote:
I would be tempted to do the following.
First, I would setup the html form so that the text boxes are named
something like 'age[Andrea]', 'age[Bob]', etc. When the form
that in a batch).
Anyhow, that is just my thoughts on the matter. Packages like
Mailman are very good at managing mailing lists, so I would just use
something like that to take care of that problem.
Jeff Schmidt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
4
spaces, and I hit 'home' and typed the delimiting token, and forgot
about the whitespace at the end (normally, whitespace is
ignored/collapsed by the parser).
Jeff Schmidt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
be causing the parser error.
Jeff Schmidt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the token. This caused
the parser to basically treat the whole rest of the script file as a
heredoc string, which is where the problems came from.
Jeff Schmidt
Jason Barnett wrote:
Jeff Schmidt wrote:
Hello,
I've made the source available at:
http://www.weldingconsultants.com/wcapp/admin.phps
404
(can't find any obvious syntax errors, for example).
Thanks for any help you can give me,
Jeff Schmidt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to delimit the
name=value pairs using ampr instead of a literal ampersand?
I'm not sure that this is exactly a bug, but it is an annoyance
nonetheless, as it adds a lot of white noise when I try to validate my
pages.
Jeff Schmidt
signature.asc
Description: OpenPGP digital signature
Thanks, that did the trick. Now my pages actually validate. :-)
Jeff
Robin Vickery wrote:
On Tue, 15 Jun 2004 09:50:55 -0400, Jeff Schmidt
[EMAIL PROTECTED]
I have some tags that look like:
a href='script.php?var=value'
And session management is rewriting these as:
a href='script.php?var
, I could:
$b = $A-getObjectB();
$b-methodFromObjectB();
But since I only want to use object B once, it seems like a waste to
store it and then use it. I do this kind of thing in other OO languages
quite frequently.
Jeff Schmidt
signature.asc
Description: OpenPGP digital signature
by
this setting, regardless of whether they have recently accessed the site?
I believe, if I understand it, it's the first scenario, where the
session get's garbage collected if the user doesn't visit your site for
sission.gc_maxlifetime seconds, correct?
Jeff Schmidt
--
PHP General Mailing List
14 matches
Mail list logo