FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Heredoc print to file? Use nowdoc.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Heredoc print to file? Use nowdoc. [message #172134 is a reply to message #172132] Mon, 31 January 2011 13:38 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 31-01-11 14:05, P E Schoen wrote:
> It would be better with an associative array but I'm not sure if I can
> loop through with:
>
> // eid,etype,et,eurl,sdt,sdow,edt,edow,ed (array elements)
> for ($i = 'eid'; $i <= 'ed'; $i++) {
> $arr[$line][$i] = $row[$i];
> }
>
> I would normally (in Delphi) do this with an "enum" with the integers
> 0..8 represented by eid..ed.

http://nl2.php.net/manual/en/control-structures.foreach.php
$a = array('eid','etype','et','eurl','sdt','sdow','edt','edow','ed');
foreach ($a as $value) {
echo $value."\n";
}

--
Luuk
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: Unable to connect to database server!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 18:42:38 GMT 2024

Total time taken to generate the page: 0.09913 seconds