tags:

views:

28

answers:

2

I'm using NetBeans and PHP. For example, I insert this code:

<?php
try {
    $dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass);
    foreach($dbh->query('SELECT * from FOO') as $row) {
        print_r($row);
    }
    $dbh = null;
} catch (PDOException $e) {
    print "Error!: " . $e->getMessage() . "<br/>";
    die();
}
?>

Now, when I hover my mouse over the $dbh symbol, I get no information about it. Other IDEs tell me which methods an object understands. I'm sure NetBeans can do the same. How?

+3  A: 

Write $dbh-> and a list of functions should come up automatically. If not, press ctrl+space

Also, see this about helping netbeans with function return types and class members.

Yacoby
The key combo would be CMD-Space on the Mac version of Netbeans.
Techpriester
how bad, this is reserved by spotlight already. Hope that can be changed??
openfrog
A: 

You can also edit the settings for the Code Completion feature in the Editor->Code Completion section of the Options window. You can modify how/when the list pops up.

Atli