[EMAIL PROTECTED] wrote:
Yes, it comes fro DB, but, quesry is alerady "to complex" (for me :))
with union, joint, ... and expanding with something else ill take
^
\__ I think to many of these are the problem ;-)
additional few hours to figure it out.
...
--
Yes, it comes fro DB, but, quesry is alerady "to complex" (for me :))
with union, joint, ... and expanding with something else ill take
additional few hours to figure it out.
And, Stut's and Chris' "continue" solution sound perfect for me :)
Thanks guys on such a fast respond!
-afan
John
[EMAIL PROTECTED] wrote:
I have a code
foreach($results as $key => $value)
{
echo $key.': '. $value .'';
}
But, $value could be zero too.
How to skip printing on screen when $vlaue == 0?
foreach($results as $key => $value)
{
if ($value == 0) continue;
echo $key.': '. $value .'';
}
-
but there is a tons of code lines inside the loop and was thingking is
there any part in foreach function that can do that? something like:
foraech($results as $key => $value, skip(empty($value)))
{
//
}
'continue' is your friend.
http://us3.php.net/manual/en/control-structures.continue.php
[EMAIL PROTECTED] wrote:
I have a code
foreach($results as $key => $value)
{
echo $key.': '. $value .'';
}
But, $value could be zero too.
How to skip printing on screen when $vlaue == 0?
I know I can do
foreach($results as $key => $value)
{
if(!empty($value))
{
echo $key.': '.
I have a code
foreach($results as $key => $value)
{
echo $key.': '. $value .'';
}
But, $value could be zero too.
How to skip printing on screen when $vlaue == 0?
I know I can do
foreach($results as $key => $value)
{
if(!empty($value))
{
echo $key.': '. $value .'';
}
}
but th
6 matches
Mail list logo