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 #172137 is a reply to message #172132] Mon, 31 January 2011 16:11 Go to previous message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma:
Senior Member
In article <Csy1p.9030$Y8(dot)1426(at)newsfe06(dot)iad>,
"P E Schoen" <paul(at)pstech-inc(dot)com> wrote:

> "Jerry Stuckle" wrote in message
> news:ii6a9c$kmg$1(at)news(dot)eternal-september(dot)org...
>
>> Your biggest problem is you are still trying to equate PHP to Perl. It's a
>> HUGE mistake to do that (no matter what the language).
>> Trying to look for the differences will only confuse you.
>
> Well, I finally got everything working at least about as well as the
> equivalent Perl script, so now I can just continue to develop this project
> in PHP. I was confused about the {} operator and it seems that it is only
> needed within a string. Now I have something like this:
>
> $arr = array();
> $qres = $db->query($q);
> $line = 0;
> while ($row = $qres->fetcharray(SQLITE3_BOTH)) {
> for ($i = 0; $i < 9; $i++) {
> $arr[$line][$i] = $row[$i];
> }
> $dtStart = date_create_from_format('Y-m-d', substr($arr[$line][4], 0,
> 10) );
> $dowStart = $arr[$line][5];

.... and furthermore, you can do like this:

$reg = $qres->fetchAll (SQLITE3_BOTH);
$num = count ($reg);

for ($i=0; $i<$num; $i++)
{
$url = $reg[$i]["eurl"];
etc ...

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[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: Sun Nov 24 04:22:30 GMT 2024

Total time taken to generate the page: 0.11558 seconds