|
Posted by nescio on 08/21/06 14:04
hello,
i have two array;
one is of the type:
$a = array('a','b','c','d');
i place this array in an associative array like:
$b = array('some_key' => 'hello ; ' . $a);
(so the value has some text then a ';' and then the array)
somewhere else in the script i must get the content of array $a from array
$b
i tried the following but it doesn't work.
i don't know why.
the result i get is:
hello
Array
but i want as a result:
hello
a
b
c
d
-------------- source code ---------------------
foreach($b as $k => $v){
$opdelen = explode(';',$v);
foreach($opdelen as $kk => $vv){
if(is_array($vv)){
/* it is an array: use a foreach to see the
content of it; */
foreach($vv as $key => $value){
echo $value . "<br>";
}
}else{
echo $vv . "<br>";
}
}
}
-------------------------------------------------
thanks
Navigation:
[Reply to this message]
|