You are here: Re: How to keep global strings in another file? « PHP Programming Language « IT news, forums, messages
Re: How to keep global strings in another file?

Posted by Geoff Berrow on 03/15/07 13:20

Message-ID: <1173963662.556376.252970@b75g2000hsg.googlegroups.com> from
Sonnich contained the following:

>something like error messages stored:
>
><?
>$sError001="stupid user";
>$sError002="not available";
>?>
>
>and then :
>
>include "errormsgs.php";
>echo $sError001;

Well yeah, that will work, so what is the question?

Though personally, I'd use an array.

<?
$sError[1]="stupid user";
$sError[2]="not available";

?>
>
>and then :
>
include "errormsgs.php";
echo $sError[1];
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

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

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