I have this function:
function supscript($texto) { print("<sup>".$texto."</sup>"); }
But when i do:
print "2".supscript("3");
I get the "3" before the "2", how is that posible?
Your function should return the value, not print it. The way you have it now, the function must be ran before the original string can be printed. That's why you see the 3 before the 2.
function supscript($texto) { return "<sup>{$texto}</sup>"; }
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php