The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
preg_replace an image
I want to output a random number (1 to 40) and to output an image associated with the number.
I have sorted the first part with... PHP Code:
Thankyou |
#2
|
||||
|
||||
If your images are names 1.gif, 2.gif etc:
Code:
$img = '<img src="path/to/images/'.mt_rand(1, 40).'.gif" alt="" />'; $this->post['message'] = str_ireplace('[picturenumber]', $img, $this->post['message']); |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|