Jack-

Thanks for the response, but I don't want to echo the array, I want to
bundle it into a new variable that will be called as part of a str_replace.
The array is created from a loop through all the navigation items in a 
database.
The code is below, if I echo the code is formatted in the wrong area on the
page.

$temp5 = str_replace("[LEFT NAV]",$new_data[3],$temp4);

At 10:29 PM 9/18/2001 -0400, you wrote:
>perhaps i'm misunderstanding you, but why not use a for loop?
>
>for($i=0;$i<count($array)-1;$i++){
>         echo $array[$i];
>}
>
>jack
>
>-----Original Message-----
>From: Scott [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, September 18, 2001 10:11 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] re: array question
>
>
>Oh, that works wonders and for the first time in 24 hours I am
>smiling!  One more
>thing to make it complete.  Is there a way to loop through the display of
>that array?
>In other words, I now have an array called $new_data and can call each
>element in
>the array by doing $new_data[0], etc, but I need to loop through everything
>in the
>array to display the navigation.
>
>  >At 08:54 PM 9/18/2001 -0400, you wrote:
>  >so then that last line in the loop should be
>  >$new_data[] = $ln;
>  >During the loop, everytime it comes to this line, $ln is added to the
>array new_data.  Eventually, you will be >able to call on the array
>elements by $new_data[0], $new_data[1], etc....


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to