// and then loop as usual using index as $post_id
foreach ($favorite_post_by_title as $post_id => $title) {
$p = get_post($post_id);
// etc.
}
note: you have get_post() twice, not good for performance, but it work