On 19/06/07, Richard Davey <[EMAIL PROTECTED]> wrote:
$userparam = "test['sam'][]";
// How to check if $userparam exists in the $_POST array
// and get all the values from it?
full_key_exists("test['sam'][]", $_POST) // returns true if key is set
full_find_key("test['sam'][]", $
Richard Davey wrote:
Hi all,
Ok it's 2am, my brain has gone to mush and I am having trouble
figuring out an easy way to do this, can anyone shed some light?
Take a peek at the following code:
// START
$userparam = "test['sam'][]";
// How to check if $userparam exists in the $_
Stut wrote:
Jim Lucas wrote:
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:47:29 PM, you wrote:
Jim Lucas wrote:
$userparam = "test['sam'][]";
then what you are saying it that this HAS to be your search string?
Heck no, it doesn't *have* to be. Feel free to remove the
Jim Lucas wrote:
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:47:29 PM, you wrote:
Jim Lucas wrote:
$userparam = "test['sam'][]";
then what you are saying it that this HAS to be your search string?
Heck no, it doesn't *have* to be. Feel free to remove the quotes from
i
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:47:29 PM, you wrote:
Jim Lucas wrote:
$userparam = "test['sam'][]";
then what you are saying it that this HAS to be your search string?
Heck no, it doesn't *have* to be. Feel free to remove the quotes from
it and then attempt
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:47:29 PM, you wrote:
Jim Lucas wrote:
$userparam = "test['sam'][]";
then what you are saying it that this HAS to be your search string?
Heck no, it doesn't *have* to be. Feel free to remove the quotes from
it and then attempt
Jim Lucas wrote:
Stut wrote:
Jim Lucas wrote:
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:06:47 PM, you wrote:
DON'T USE SINGLE QUOTES IN YOUR NAME="" ATTRIBUTE
Hate to piss on your bonfire but a single quote is a perfectly valid
(if somewhat stupid choice of) character for in
Jim Lucas wrote:
$userparam = "test['sam'][]";
then what you are saying it that this HAS to be your search string?
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William
Stut wrote:
Jim Lucas wrote:
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:06:47 PM, you wrote:
DON'T USE SINGLE QUOTES IN YOUR NAME="" ATTRIBUTE
Hate to piss on your bonfire but a single quote is a perfectly valid
(if somewhat stupid choice of) character for inclusion in an arra
Jim Lucas wrote:
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:06:47 PM, you wrote:
DON'T USE SINGLE QUOTES IN YOUR NAME="" ATTRIBUTE
Hate to piss on your bonfire but a single quote is a perfectly valid
(if somewhat stupid choice of) character for inclusion in an array key.
Cheer
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:06:47 PM, you wrote:
DON'T USE SINGLE QUOTES IN YOUR NAME="" ATTRIBUTE
where in this sentence did I say that it was invalid?
just told you not to use them, because it is going to mess with your output
Hate to piss on your bonfire bu
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:06:47 PM, you wrote:
DON'T USE SINGLE QUOTES IN YOUR NAME="" ATTRIBUTE
Hate to piss on your bonfire but a single quote is a perfectly valid
(if somewhat stupid choice of) character for inclusion in an array key.
Cheers,
Rich
if you
Richard Davey wrote:
Hi Jim,
Tuesday, June 19, 2007, 5:06:47 PM, you wrote:
DON'T USE SINGLE QUOTES IN YOUR NAME="" ATTRIBUTE
Hate to piss on your bonfire but a single quote is a perfectly valid
(if somewhat stupid choice of) character for inclusion in an array key.
Cheers,
Rich
in this
Richard Davey wrote:
Hi all,
Ok it's 2am, my brain has gone to mush and I am having trouble
figuring out an easy way to do this, can anyone shed some light?
Take a peek at the following code:
// START
$userparam = "test['sam'][]";
// How to check if $userparam exists in the $_
Richard Davey wrote:
Hi Stut,
Tuesday, June 19, 2007, 1:49:53 PM, you wrote:
Very nice, thank you. I was hoping there would be a way to do it
without resorting to eval(), but if even you can't figure out how, I'm
not going to waste any more time trying to either :)
You probably could by bre
Richard Davey wrote:
Hi Stut,
Tuesday, June 19, 2007, 1:16:54 PM, you wrote:
The problem is finding a way to expand the input name (which is a
string) into a format that $_POST can be searched for. Or do the
reverse, iterate through $_POST to find a match for the input name and
get that value.
Richard Davey wrote:
Hi Stut,
Tuesday, June 19, 2007, 12:09:12 PM, you wrote:
If you have no control over what the fields in the form will be, what
are you doing with the data? Surely if you're writing logic that
requires you to know what the fields are called, you need to have
control over
Richard Davey wrote:
Hi Stut,
Tuesday, June 19, 2007, 10:16:02 AM, you wrote:
If you can't control $userparam and it has to look like you have it then
you're parsing of it is a little more involved, but still fairly simple.
What are you actually trying to do? Where will $userparam actually
Richard Davey wrote:
Hi all,
Ok it's 2am, my brain has gone to mush and I am having trouble
figuring out an easy way to do this, can anyone shed some light?
Take a peek at the following code:
// START
$userparam = "test['sam'][]";
// How to check if $userparam exists in the $_
Perhaps you're looking for in_array()?
On Monday 18 June 2007, Richard Davey wrote:
> Hi all,
>
> Ok it's 2am, my brain has gone to mush and I am having trouble
> figuring out an easy way to do this, can anyone shed some light?
>
> Take a peek at the following code:
>
> // START
>
> print_r(
20 matches
Mail list logo