* Thus wrote Verdon Vaillancourt ([EMAIL PROTECTED]):
> Hi :)
>
> This is the original statement that works...
>
> foreach ($this->_content as $item) {
> if ($item['type'] == 'item'){
> ..
ok. good so far.
>
>
> This is my attempt to count items and put a stop in the foreach so it only
>
Hmm, yes I see. Thank you.
I guess what I should look at then is getting the key value (internal
counter/pointer) in the array going to the foreach. Like this example...
$a = array( 1,2,3,17 );
$i =0;/* for illustrative purposes only */
foreach ( $a as $v ) {
echo "\$ a[$i ]=> $v. \n ";
Hi :)
I'm trying to put a stop in a foreach statement following the user
suggestion here, php.net/manual/en/control-structures.foreach.php
Not really knowing what I am doing, I am running into some synatx problems.
I'm sure I'm doing something really stupid, can anybody point it out?
This is the
3 matches
Mail list logo