Re: [PHP-DB] Printing selected characters (strcnt?)

2004-07-15 Thread Matthew McNicol
Try this:
// takes the 1st character from $last_name and adds
// datetime in format of DDMMYYhhmm
$rma = substr( $last_name, 0, 1) . date("dmyHi);
See:
aspn.activestate.com/ASPN/docs/PHP/function.substr.html
uk2.php.net/date


Vincent Jordan wrote:
I am trying to figure out how to select the first letter of from the form
field print it then append by datetime.
Here is an example:

$first_name = $_POST['first_name'];
$last_name  = $_POST['last_name'];
$name = $first_name . ' ' . $last_name
$rma = ?strcnt($last_name), 1 . Datetime(?) // takes the 1st character from
$last_name and adds datetime in format of 715041200

Thanks any help appreciated
Vincent Jordan
Technical Support
Smart Parts, Inc.
Loyalhanna Business Complex
100 Station Street
Loyalhanna, PA 15661
800-992-2147 X 5617
--
_
Matthew McNicol
yellowmarker.co.uk
PHP / MySQL web development
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Printing selected characters (strcnt?)

2004-07-15 Thread John W. Holmes
Vincent Jordan wrote:
I am trying to figure out how to select the first letter of from the form
field print it then append by datetime.
Here is an example:

$first_name = $_POST['first_name'];
$last_name  = $_POST['last_name'];
$name = $first_name . ' ' . $last_name
$rma = ?strcnt($last_name), 1 . Datetime(?) // takes the 1st character from
$last_name and adds datetime in format of 715041200

There is no "strcnt" function and your code has errors.
$rma = $last_name{0} . time();
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Printing selected characters (strcnt?)

2004-07-15 Thread Matt M.
> $first_name = $_POST['first_name'];
> $last_name  = $_POST['last_name'];
> $name = $first_name . ' ' . $last_name
> $rma = ?strcnt($last_name), 1 . Datetime(?) // takes the 1st character from
> $last_name and adds datetime in format of 715041200

$rma = substr ($last_name, 0 , 1).Your.Datetime;

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Printing selected characters (strcnt?)

2004-07-15 Thread Galbreath, Mark A
Isn't there a tokenizer method?

Mark

-Original Message-
From: Vincent Jordan [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 5:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Printing selected characters (strcnt?)


I am trying to figure out how to select the first letter of from the form
field print it then append by datetime.

Here is an example:


$first_name = $_POST['first_name'];
$last_name  = $_POST['last_name'];
$name = $first_name . ' ' . $last_name
$rma = ?strcnt($last_name), 1 . Datetime(?) // takes the 1st character from
$last_name and adds datetime in format of 715041200


Thanks any help appreciated


Vincent Jordan
Technical Support
Smart Parts, Inc.
Loyalhanna Business Complex
100 Station Street
Loyalhanna, PA 15661
800-992-2147 X 5617

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php