Remove a blank element from array- How?
ok, guys, this SHOULD be easy, right? In an old HTML guy, and getting better at this, but this seems like it should have been a set PHP funtion...
I post variables via form on previous page and its assigned to $arrayname (that all works), and if the blank element falls to end or beginning, we could pop it off...but what if the blank "" string (which it is, i tested and it comes back string) is in the middle of the array. All I want to do is remove blank entries before further manipulating the array into display and saved contents.
PLEASE! anybody! help! LOL! I have searched everywhere!
<pre>
$array=$arrayname;
$cnt=count($array);
for($i=0; $i<$cnt; $i++){
echo "<tr><td width=100>".$array[$i]."</td></tr>\n";
echo gettype($array[$i]);
}
$parsed=$array;
</pre>