03-04-2008, 08:58 PM
|
#7 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
Indeed Xenon, or
PHP Code:
define (_TALK_PHP, 'TalkPHP'); if ( defined ( _TALK_PHP ) ) { echo 'Defined'; }
Make a function for defining those things I guess. There is a better way tho.
PHP Code:
$lang = array(); $lang[] = 'talkphp'; $lang[] = 'talkPHP'; function pushWord($word) { global $lang; if ( !in_array($word, $lang) ) { array_push($lang, $word); echo 'Added to the list!'; } else { echo $word.' is already in the array!'; } } pushWord('talkPHP'); echo '<br><br>Your content of the $lang array:<br><br>'; foreach ($lang as $key => $value) { echo $value.'<br>'; }
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|