Jump to content

How to access value's from the PDO fetch command


jak82

Recommended Posts

Hey there,

 

I am using the PDO fetch command to return a vlue from the database, now the problem I am having is being able to access the value,

 

$bob = $result->fetch(PDO::FETCH_ASSOC);

print_r($bob);

 

When I print it out on screen I get

Array ( [assessmentID] => 1 )

 

If I try $bob[0] it return nothing,

 

any ideas?

 

Chris

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.