Connecting Tech Pros Worldwide Forums | Help | Site Map

need help in arrays?

Newbie
 
Join Date: Jan 2008
Posts: 14
#1: Jan 14 '08
hi..

greetings!!

im confused.. how can an arrayrow will be displayed in an column?? could you give me advices on this part.. tanx.. need it for one day if its ok with you?


Expand|Select|Wrap|Line Numbers
  1.  
  2. <?php
  3. $variablearray=array();
  4.  
  5. $variablearray=$variablearray['value'];
  6.  
  7. $variablearray=implode(',',$variablearray);
  8.  
  9. echo $varibalearray;
  10. ?>
  11.  
  12.  
this will dispaly only in a row style: value[0],value[1],value[2].

i want the output to be in a column style??

value[0]
value[1]
value[2]


thank you in advance for your help..

Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,949
#2: Jan 15 '08

re: need help in arrays?


Try using FOREACH

[php]
$__array = ("a", "b", "c");

foreach ( $__array as $__x ) {
echo $__x."<br />";
}
[/php]
Reply