On Tue, 2005-02-01 at 01:41 +0000, Pagongski wrote:
> 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?
>
> And:
>
> print(supscript("3")."2");
>
> makes the 2 appear before the 3.
> I am confused!
>
> Thanks
>
probably because it calls the function before it calls the main print.
try return instead of print.
example:
function supScript($txt)
{
return "<sup>{$txt}</sup>";
}
print "2" . supScript("3");
You shouldn't print a function that prints.. ;-)
-Robby
--
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON | www.planetargon.com
* Portland, OR | [EMAIL PROTECTED]
* 503.351.4730 | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
* --- Now hosting PostgreSQL 8.0! ---
****************************************/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php