Re: Still trying to figure this out...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2006-06-19 at 21:09, Rob W. wrote:
>     $range = array_flip( range( 1, 24 ) );
> 
>     $query = "SELECT switchport FROM network ";
>     if( ($result = mysql_query( $query )) !== false )
>     {
>         while( ($row = mysql_fetch_array( $result )) !== false )
>         {
>             unset( $range[$row[0]] );
>         }
>     }
> 
>     foreach( $range as $switchport => $foo )
>     {
>         echo '<option 
> value="'.$switchport.'">'.$switchport.'</option>'."\n";
> 
>         $result = 0;
>     }
> 
> 
> With that, I dont get anything, Not sure what you mean by empty to is_null 
> ect..


You have mixed up replies... either way I suggest you look at what YOU
are doing wrong. The above code is sound. (although I don't know who
slipped in "$result = 0;" since it serves no purpose.

What I suggest you do is add echo statements thoughout the loops. To see
which loops are entered and how many times etc. More than likely you
have some kind of error reporting disabled and you have a bug elsewhere
in your code of which none of us are privy.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux