Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 if string conditional
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #8
RE: if string conditional
This code works for me :

Code:
<setvar r>array('text 1', 'text 2', 'text 3')</setvar>
<?=$GLOBALS['tplvars']['r'][array_rand($GLOBALS['tplvars']['r'])]?>


I added a ] at the end of the second line right before the ?



[Image: leelink.gif]
MYBB1.6 & XThreads
08-30-2012 01:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
if string conditional - bekti - 08-29-2012, 01:14 PM
RE: if string conditional - ZiNgA BuRgA - 08-29-2012, 03:25 PM
RE: if string conditional - bekti - 08-29-2012, 03:57 PM
RE: if string conditional - ZiNgA BuRgA - 08-29-2012, 04:51 PM
RE: if string conditional - bekti - 08-29-2012, 07:08 PM
RE: if string conditional - RateU - 08-30-2012, 01:11 AM
RE: if string conditional - bekti - 08-30-2012, 01:21 AM
RE: if string conditional - leefish - 08-30-2012 01:36 AM
RE: if string conditional - bekti - 08-30-2012, 02:02 AM

 Standard Tools
Forum Jump: