>
> foreach($newlines as $newline) {
>
> #how do I get the index of the array each time $newline is printed out?
>
> echo ??;
> }
foreach($newlines as $id=>$newline){
echo $id.''.$newline;
}
read the documentation
http://us3.php.net/manual/en/control-structures.foreach.php
--
PHP Gener
foreach($newlines as $newline) {
#how do I get the index of the array each time $newline is printed out?
echo ??;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
2 matches
Mail list logo