Drupal 7: How can I get path for node or term in drupal with php code?
You can use the l() function to do this.

Example: 

$link = l('Link Title', 'node/' . $node_id);
$link = l('Link Title', 'taxonomy/term/' . $term_id);