If I got it correctly, you're using PDO and using Statement fetchAll method, which would return an array of arrays. Your variable $row would fit best as $rows if you know what I mean... try to iterate over the return of fetchAll and give it a print to see how it looks like. 2014-05-19 20:57 GMT-03:00 ICCSI <inungh@xxxxxxxxx>: > I have following code to fetch data from database. > I am able to print the array, but I got HTTP 500 error when I assign the > array the value to echo the result. > > I think I am missing something between array and variable. > > Your help and information is great appreciated, > > Iccsi, > > > $row = $sth->fetchAll(PDO::FETCH_ASSOC); > print_r($row); > print("\n"); > $name = "{$row['MyID']}"; > echo $name; -- Att, ____________________________________________________ Ricardo R Bonfim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php