php-windows Digest 13 Aug 2007 21:46:46 -0000 Issue 3309

Topics (messages 28365 through 28366):

Re: formating a string
        28365 by: cdmn

Re: Wamp/XAMPP and phpmyadmin
        28366 by: Leo G. Divinagracia III

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
James Savage wrote:
i have a 12 digit code that i want to format as follows xxxx-xxxx-xxxx it is all numbers i tried using substr() to format it in this fassion
$code = abcdwxyz8765;
$string = array();
$string[] = substr($code,1,4);
$string[] = substr($code,5,8);
$string[] = substr($code9,12);
echo $string[0],'-',$string[1],'-',$string[2];
OUTPUT SHOULD BE : abcd-wxyz-5678
I GET : -wxyz678-5678
Any help?

Very very nasty code :/

Here ya go: implode('-', str_split('abcdwxyz8765', 4));
Test:
C:\>php -r "echo implode('-', str_split('abcdwxyz8765', 4));"
abcd-wxyz-8765

--- End Message ---
--- Begin Message ---


Abhisek Dutta wrote:
I recently came across wamp and XAMPP and was tempted to use them. They seemed really easy to use and the installation is simple and easy. What really amazed me is phpmyadmin. But i am yet to start with phpmyadmin. I am still learning php. If i start using phpmyadmin i'd probably never learn to use command line. So, my question is how healthy is it to use phpmyadmin for a n00b?
Regards
Abhisek



if you plan on using phpmyadmin, make sure you upgrade with the latest fixes.

my servers keep getting hammered by script kiddies trying to launch phpmyadmin and using the various bugs in it to hack my server.

i just removed it from my install of XAMPP. i like XAMPP since it has SSL compiled into apache...

for windows and mysql administering, i use the freebie version of SQLYOG from www.sqlyog.com
--- End Message ---

Reply via email to