[PHP] what is %s %d

2003-08-14 Thread pehepe php
what is %s and %d   I see these in php tutorials. These are used in printing 
data from database but I don't know why we use %s and %d.  And is there any 
expressions like this?  Thank you for your answers.

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

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


Re: [PHP] what is %s %d

2003-08-14 Thread Jackson Miller
They are codes for date formatting.

Specifically:
%s represents seconds with leading zeros.
%d represents day of the month with leading zeros

so
date("%s %d",mktime());
would equal something like
59 08

you can find all the date codes at http://php.net/date

-Jackson

P.S. I hope you at least tried to look this up.


On Monday 11 August 2003 9:36, pehepe php wrote:
> what is %s and %d   I see these in php tutorials. These are used in
> printing data from database but I don't know why we use %s and %d.  And is
> there any expressions like this?  Thank you for your answers.
>
> _
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus

-- 
jackson miller
 
cold feet creative
615.321.3300 / 800.595.4401
[EMAIL PROTECTED]
 
 
cold feet presents Emma
the world's easiest email marketing
Learn more @  http://www.myemma.com

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



Re: [PHP] what is %s %d

2003-08-14 Thread CPT John W. Holmes
From: "Jackson Miller" <[EMAIL PROTECTED]>


> They are codes for date formatting.
>
> Specifically:
> %s represents seconds with leading zeros.
> %d represents day of the month with leading zeros
>
> so
> date("%s %d",mktime());
> would equal something like
> 59 08

Actually you'd get:

%59 %08

because date() does not use percent signs in the formatting. However, and I
think this is what you're thinking about, DATE_FORMAT() in MySQL does use
the percent signs like you've demonstrated.

---John Holmes...


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



Re: [PHP] what is %s %d

2003-08-14 Thread Mike Migurski
>They are codes for date formatting.
>
>Specifically:
>%s represents seconds with leading zeros.
>%d represents day of the month with leading zeros

They can also be codes for the printf family of functions:
%s represents string
%d represents number

See http://php.net/sprintf

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html


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