if(is_array($_POST)) always = TRUE - why?

From: Randell D. (you.can.email.me.at.randelld_at_yahoo.com)
Date: 10/31/03


Date: Thu, 30 Oct 2003 23:00:29 GMT


Folks,

I test if my PHP should process form data by checking if $_POST is an
array - However I always find its condition proves true - Why or
alternatvily, what other method can one use to check for this sort of
situation?

<?
 if(is_array($_POST))
 { die("<h1>here</h1>"); }
?>

I have tried isset() too and this also returns TRUE when it should be
false... must I always test with a count($_POST)==0?

ideas/solutions/anyone?

most appreciated - via the newsgroup
thanks
randelld



Relevant Pages

  • Re: if(is_array($_POST)) always = TRUE - why?
    ... > I test if my PHP should process form data by checking if $_POST is an ... "If there is a God, ...
    (comp.lang.php)
  • Re: Need help on PHP for MPE/ix
    ... Here is the syntax of the dbupdate intrinsic in PHP: ... assoc array of item values) ... Please let me know if you have any more suggesstions to solve this problem. ... Pavan Kumar Rati wrote: ...
    (comp.sys.hp.mpe)
  • Re: Using a RegEx as a "variable" WITHIN an array?
    ... believe the PHP one is also based upon. ... combination of 1 or more numerics in this instance would give you your ... add this to your array - you could then do a pattern match on the array ... > Dim selCriteria as String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Need help on PHP for MPE/ix
    ... If one item is an array, it must be declared as such in the list ... So, please show us the declaration of the record buffer, and its ... Of Pavan Kumar Rati ... Need help on PHP for MPE/ix ...
    (comp.sys.hp.mpe)
  • Re: attempting to return values from array from w/in a function
    ... What I get is an array w/ only the most recent array entry. ... I am new to PHP & do not have formal scripting ... you end up comparing strings, but the test you mean probably is simply: ... case 1: {codeblock} ...
    (comp.lang.php)