i have a php script and for some reason i get this error

Cannot use object of type stdClass as array

what do i need to do to fix it