Re: Array Problem

From: Date: Sat, 17 Apr 2004 17:41:40 +0000
Subject: Re: Array Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-183726@lists.php.net to get a copy of this message
That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i < $len; ++$i) { $ar[] = $a{$i}; } HTH Richard Friday, April 16, 2004, 11:00:49 PM, you wrote: > Hi > I have i Problem i got a variable a=2351 now i need to create an array out of this variable > a[0]=1 > a[1]=3 > a[2]=5 > a[3]=1 > I have an idea to use the modulo function an do some Math but im > sure there is a nicer way of solving my prob > thx Flavio

« previous php.general (#183726) next »