Ik heb het volgende gemaakt.
Maar als ik nu [list=1]
intyp wordt er telkens <ol type=a> neergezet terwijl dit eigenlijk <OL> had moeten zijn. Weet iemand hoe dit komt?
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| <? $a1 = explode("[list=1]", $artikel); for ($i1=0; $i1<count($a1); $i1++) { $b1 = strpos($a1[$i1], "[/list]"); if ($b1) $a1[$i1] = "<OL>".str_replace("[*]", "<LI>", substr($a1[$i1], 0, $b1))."</OL>".substr($a1[$i1], $b1 + 7); } $a2 = explode("[list=a]", $artikel); for ($i2=0; $i2<count($a2); $i2++) { $b2 = strpos($a2[$i2], "[/list]"); if ($b2) $a2[$i2] = "<OL type=A>".str_replace("[*]", "<LI>", substr($a2[$i2], 0, $b2))."</OL>".substr($a2[$i2], $b2 + 7); } $artikel = implode("", $a1); $artikel = implode("", $a2); ?> |
Maar als ik nu [list=1]
intyp wordt er telkens <ol type=a> neergezet terwijl dit eigenlijk <OL> had moeten zijn. Weet iemand hoe dit komt?