corillo181 Posted June 24, 2007 Share Posted June 24, 2007 i got a functions and it echos out a result, the problme is if i make the functions into a string it still echos out the result at the spot where the string is at.. illustration <?php function name(){ echo 'jay'; } ?> now my problem is when i try to use it. <?php $names=name(); echo $names; ?> the result will be jay jay Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 24, 2007 Share Posted June 24, 2007 rather than using echo in the name function use return: function name(){ return 'jay'; } Quote Link to comment Share on other sites More sharing options...
corillo181 Posted June 24, 2007 Author Share Posted June 24, 2007 thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.