Project

General

Profile

$initopic » History » Version 1

Per Amundsen, 10/17/2015 08:23 AM

1 1 Per Amundsen
_Added in 1.9.9_
2
3
*$initopic(file,topic|N,[item|N])*
4
5
Returns the name/Nth position of the specified topic/item in an INI/text file.
6
7
_See also [[$readini]]._
8
_Same as [[$ini]]._
9
10
*Parameters*
11
12
file - File to read from.
13
topic|N - Topic or the Nth topic, if N = 0 number of topics, otherwise the Nth topic.
14
[item|N] - Item or the Nth item, if N = 0 number of item, otherwise the Nth item. (optional)
15
16
*Examples*
17
18
<pre>
19
; Print number of topics in '$adiircini'.
20
//echo -ag $initopic($adiircini,0)
21
22
; Print the name of the first topic in '$adiircini.
23
//echo -ag $initopic($adiircini,1)
24
25
; Check if the topic 'Messages' exists.
26
//echo -ag $initopic($adiirc,Messages)
27
</pre>