[FLUG] Re: query mysql
- From: Carlo Minucci <gecco@xxxxxxxxxxxx>
- To: fanolug@xxxxxxxxxxxxx
- Date: Wed, 30 Jul 2003 12:27:06 +0200
Mailing List del Fortunae LUG
=============================
Simon wrote:
No però se $str è il "7" che hai tirato fuori puoi fare tipo:
if(strlen($str) == 1)
{
$str = '0' . $str;
}
Ma c'era una funzione che faceva da sola il padding... wuh se la ricorda di
sicuro.
printf("%02s", $mesi[0]);
facendo cosi` risparmio ben 3 righe di codice :)
--
«Just in terms of allocation of time resources, religion is not very efficient.
There's a lot more I could be doing on a Sunday morning.» Bill Gates
- References:
- [FLUG] query mysql
- From: Carlo Minucci
- [FLUG] Re: query mysql
- From: Simon
Other related posts:
- » [FLUG] query mysql
- » [FLUG] Re: query mysql
- » [FLUG] Re: query mysql
if(strlen($str) == 1)
{
$str = '0' . $str;
}Ma c'era una funzione che faceva da sola il padding... wuh se la ricorda di sicuro.
- [FLUG] query mysql
- From: Carlo Minucci
- [FLUG] Re: query mysql
- From: Simon