Hello Nathan,

Do you mean $x{8}?
That is good but not for all situations.
I  need sometimes to make an array with letters as keys and numbers as
values,  like  this  (I  give  English alphabet just as an example, so
please don't suggest str_split):
$alphabet="abcdefghijklmnopqrstuvwxyz";
// I wish that worked
$alphabet_array=explode('', $alphabet);
$letter_numbers=array_flip($alphabet_array);

this is just one case I encountered some time ago. Yes, I made this by
separating  letters with commas... but it's not the unique case when I
need it.
-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

------------ Original message ------------
From: Nathan Nobbe <quickshif...@gmail.com>
To: Robert Cummings
Date created: , 7:33:08 PM
Subject: [PHP] phpsadness


      On Sat, May 28, 2011 at 4:33 AM, Robert Cummings 
<rob...@interjinn.com>wrote:

> On 11-05-28 05:26 AM, Andre Polykanine wrote:
>
>> Hello Lester,
>>
>> Actually,  many of the points are not important for me so far, however
>> this one really drives me mad:
>> http://phpsadness.com/?page=sad/35   (can't   explode()  by  an  empty
>> string)
>> Besides that, he says nothing about unicode issues.
>> I  love  PHP  (I  really do, it's a neat language, as for me!), but it
>> *should* be unicode by default. If you ever read my code when I try to
>> make and strtr() with a unicode string, you'll understand me because I
>> do  an iconv(), then strtr() and then an iconv() back to unicode. That
>> is not a good coding practice, is it?
>>
>
> Isn't explode() with an empty string akin to division by zero?
>

Strings are already accessible through array notation anyway, seems like ol
dude may benefit from a php-general membership as well.

-nathan


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

Reply via email to