You are here: Re: [SMARTY] php function call « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] php function call

Posted by Matt Warden on 09/27/40 11:22

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

messju mohr wrote:
> On Tue, Jul 26, 2005 at 01:39:14PM -0700, JM wrote:
>
>>Ok I have a group of Smarty variable assignments that I want to put in
>>a php function so I can call it at various points in the script.
>>However, it's not returning any data when I call the function. Any
>>ideas?
>>
>><?php
>>function meat($obj)
>
>
> if this is php4 you have to pass $obj by reference:
> function meat(&$obj)

In addition to that, your variables are out of scope in the function,
so they will be empty.

- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD4DBQFC5sjMAQ0d4HGyPE8RAjbtAJMGFxI8Obn/siQSy3z0CiUCp6c4AJ91N3Sb
rNTqgiPomwrjiU99GwxqBQ==
=yG+9
-----END PGP SIGNATURE-----

 

Navigation:

[Reply to this 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

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