[PHP-DB] printf() in a variable, or alternative to

2005-05-27 Thread mayo
I need to be able to format data. Printf() is perfect because I need a certain amount of characters (30 for address). However I need this formatted data to be inside a file that's fwrite() and then FTPed to a distributor who will parse it and input into their database. printf(%

RE: [PHP-DB] printf() in a variable, or alternative to

2005-05-27 Thread N . A . Morgan
Try sprintf(). -Original Message- From: mayo [mailto:[EMAIL PROTECTED] Sent: 27 May 2005 14:02 To: php-db@lists.php.net Subject: [PHP-DB] printf() in a variable, or alternative to I need to be able to format data. Printf() is perfect because I need a certain amount of characters

Re: [PHP-DB] printf() in a variable, or alternative to printf()

2005-05-27 Thread Philip Hallstrom
I need to be able to format data. Printf() is perfect because I need a certain amount of characters (30 for address). However I need this formatted data to be inside a file that's fwrite() and then FTPed to a distributor who will parse it and input into their database. printf(%

RE: [PHP-DB] Letters loop

2005-05-27 Thread Juffermans, Jos
Hi, I didn't even think PHP would do anything until I just tried it. ?php for ($i = A; $i = Z; $i++){ echo $i . br /; } ? outputs: A B C X Y Z AA AB AY AX YA YB YY YZ Why it continues after Z is not clear to me, and why it doesn't continue until ZZ isn't either.

Re: [PHP-DB] printf() in a variable, or alternative to printf()

2005-05-27 Thread graeme
Are you looking for the sprintf() function? graeme mayo wrote: I need to be able to format data. Printf() is perfect because I need a certain amount of characters (30 for address). However I need this formatted data to be inside a file that's fwrite() and then FTPed to a distributor who

Re: [PHP-DB] printf() in a variable, or alternative to printf()

2005-05-27 Thread Simon Rees
On Friday 27 May 2005 04:49, mayo wrote: I need to be able to format data. Printf() is perfect because I need a certain amount of characters (30 for address). However I need this formatted data to be inside a file that's fwrite() and then FTPed to a distributor who will parse it and input

Re: [PHP-DB] Letters loop

2005-05-27 Thread Chris
MIGUEL ANTONIO GUIRAO AGUILAR wrote: Hi!! I wanna a do a for loop with letters, Is this possible? for ($i = 'A'; $i = 'Z'; $i++){ // code } -- MIGUEL GUIRAO AGUILERA Logistica R8 - Telcel Tel: (999) 960.7994 Cel: 9931-6 No, but there are multiple ways this

[PHP-DB] DB dont_die and errors

2005-05-27 Thread Alessandro Pasotti
Hi all, When the connection fails, the default behaviour is to die, printing also the dns, with user and password!!! How can I avoid this? When I set dont_die, it goes on but the script stops later with a fatal error (since DB is not initialized). Does anybody knows a graceful way to handle

[PHP-DB] problem with php oracle on linux

2005-05-27 Thread Anom
i have configured and compiled php 4.11 with oracle client 10g (not instant client) on linux and works fine. the client connects well with the oracle server which reside on other machine. but the problem arise when i used php, i've got the following warning : *Warning*: ocilogon():

RE: [PHP-DB] Letters loop

2005-05-27 Thread Rob Agar
hi Miguel I wanna a do a for loop with letters, Is this possible? for ($i = 'A'; $i = 'Z'; $i++){ // code } you can, but it doesn't do what you think it should do. Apparently it gets to Z, restarts with AA, AB, AC etc and continues like that until it hits YZ. feck knows why :-/ hth (a

Re: [PHP-DB] Letters loop

2005-05-27 Thread Rasmus Lerdorf
Chris wrote: You could create a string, loop through it's length, then access the $i character in the string. $sAlpha = 'ABCDEF...XYZ'; for($i=0;$i26;++$i) { $sLetter = $sAlpha{$i}; // code } range() is a powerful function for creating such strings. You don't need to loop.

RE: [PHP-DB] DB dont_die and errors

2005-05-27 Thread Bastien Koert
You should be able to comment out the error message portions that you don't want to display bastien From: Alessandro Pasotti [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] DB dont_die and errors Date: Thu, 26 May 2005 18:58:07 +0200 Hi all, When the