05-05-2008, 07:48 AM
|
#2 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by Tanax
Hi!
How could make a random coded string which has the markup like the one below:
Code:
XXXX-XXX-XXX-XX-XXXX
I understand that I have to use random, or some form of array splits.. but.. how? 
|
Here you go:
PHP Code:
<?php
$string = "TEST-Aijnn-Bvvv";
$string = explode('-',$string);
$string = $string[0].'-'.$string[1].'-'.$string[2];
echo $string; ?>
change the string however you want.
__________________
VillageIdiot can have my babbies ;d
Last edited by Orc : 05-05-2008 at 08:24 AM.
|
|
|
|