RE: [PHP-DB] random
| From: | Beau Lebens | Date: | Wed, 05 Jun 2002 01:45:19 +0000 |
| Subject: | RE: [PHP-DB] random | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19607@lists.php.net to get a copy of this message | ||
substr($foo, 0, 3);
check the other string functions in the manual - they are *very* useful
Beau
// -----Original Message-----
// From: Natividad Castro [mailto:ncastro@cots.com]
// Sent: Wednesday, 5 June 2002 3:57 AM
// To: php-db@lists.php.net
// Subject: [PHP-DB] random
//
//
// hi to all,
//
// I have a drop down menu where users will select a word.
// After they submit
// it, I will generate a code number where I want to display
// the first three
// characters of the word they selected follow by Month and
// Date and three
// number that will be generating randomly.
// I don't have any problem displaying the MM/DD and the three
// numbers, but I
// don't know how to get the first three characters.
//
// //first page
// <select name="word">
//
// //second page
// $firsThreecharacter = $word;
//
// //here is MM/DD
// $date = gmDate("md");
// $number = rand(100,999);
// $code_number = $str_char.$date.$number;
// echo $code_number." ";
//
// Any help is greatly appreciate it
//
// Many thanks in advanced
//
// Nato
//
//
//
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
//