# Trouble with php, trying to make hypertext link dynamically

**URL:** https://forum.kirupa.com/t/trouble-with-php-trying-to-make-hypertext-link-dynamically/216533
**Category:** Uncategorized
**Created:** [February 17, 2007, 6:09pm UTC](https://forum.kirupa.com/t/trouble-with-php-trying-to-make-hypertext-link-dynamically/216533 "2007-02-17T18:09:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Zerojosh](https://avatars.discourse-cdn.com/v4/letter/z/bc8723/32.png) [@Zerojosh](https://forum.kirupa.com/u/Zerojosh)
#### Post date: [February 17, 2007, 6:09pm UTC](https://forum.kirupa.com/t/trouble-with-php-trying-to-make-hypertext-link-dynamically/216533/1 "2007-02-17T18:09:50Z")

</div>

I’ve been banging my head all night about this… I’m very new to php so please be gentle… (the file names below refer to common wordpress “theme” files, fyi):

I’m trying to write a function that I can call on various pages to simply auto-generate a hyperlink (essentially for stumbleupon and such). (I’ve looked at the plug-ins and decided they don’t really fit what I’d eventually like to do). Here is the function, located in functions.php:

function joshtags($perm,$title){  
echo “\<a href=“[http://www.stumbleupon.com/submit?url={$perm}&title={$title}](http://www.stumbleupon.com/submit?url=%7B%24perm%7D&title=%7B%24title%7D)”\>\<img src=“icon\_su.gif”\> Stumble it!\</a\>”;  
}

and here is the function being called in single.php:  
\<?php joshtags(the\_permalink(),the\_title()); ?\>

As you can see here (under the post title):  
[http://www.quantummirage.com/blog/?p=32](http://www.quantummirage.com/blog/?p=32)  
Everything gets echo’d out but the order is wrong and only partial hyperlinked. I’m goin nuts!  
Thanks in advance for the help!
