Reply to Re: [PHP] simple question

Your name:

Reply:


Posted by John Holmes on 02/01/05 03:51

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?

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация