jak82 Posted October 18, 2007 Share Posted October 18, 2007 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 Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted October 18, 2007 Share Posted October 18, 2007 The print_r is telling you that the array element is $bob[assessmentID], and that its value is 1 $bob[0] does not exist PhREEEk Quote Link to comment Share on other sites More sharing options...
jak82 Posted October 18, 2007 Author Share Posted October 18, 2007 thanks phreeek, That works fine now , Chers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.