gooney0 wrote:Jef,
You could either remove the unwanted key from the array or use an if statement to not display it.
The question is how will you know which key contains the secret? Is it the 4th key? or does it have a certain name?
If it's the 4th key you'll need to keep track of the number of keys you're looping through.
$num=0;
foreach($items as $row)
{
if($num !="3") // We're starting at zero
{
// print the data
}
$num++;
}
Thanks guys... Both new things to store in my brain...
It wouldn't be the last item I'd be hiding, but I would know which ones I'd want to hide. As it stands right now, I think I'd be hiding 0, 2, and 4, in an array with about 12 fields, but I've been curious to figure out how to do it. Normally, I think of something I could do and think "That could be done by doing this." Even if I'm not right (usually aren't, just getting my feet wet), at least I have ideas.
For the array, I learned how to print the table, but could not figure out how to skip certain (column) fields.
So taking gooney's example, could I use if($num != 0 OR $num != 2 OR $num != 4) or would I have to use nested Ifs?