Re: Splitting a string

From: Date: Wed, 15 Nov 2006 00:06:19 +0000
Subject: Re: Splitting a string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-244633@lists.php.net to get a copy of this message
What's the code? -D On Nov 14, 2006, at 4:17 PM, Børge Holen wrote:
This numer has dynamic lenght, witch is the root of my problems. $number = 123456789 should print as following: var1: 12345 (and it is this lengt witch varies) var2: 67 var3: 89. I've been using substr with negative numbers to fetch the last two vars. thereafter explode to get the first number. Ok I understand the code and can use it, but it feels wrong. Does anyone have any idea on suitable functions for such a task, both more size (as in code) and speed effective. It is not a mission critical, but moreover a opinion of what things should look like. I've been looking into string/explode functions on php.net without getting past my current code. ----- Børge Kennel Arivene http://www.arivene.net --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Darrell Brogdon darrell@brogdon.net http://darrell.brogdon.net *************************************
** Prepare for PHP Certication!    **
** http://phpflashcards.com        **
*************************************

« previous php.general (#244633) next »