Stopping and starting is supposed to be faster.
You may want to read:
http://phpbeginner.com/columns/jason/echo
However, I tend to echo anyway because the code is much easier on the eyes.
;)
As far as print vs echo, I have no idea. My guess would be that echo is
faster, but I have nothing to back that up. :)
> -----Original Message-----
> From: Jerry Nelson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 22, 2001 2:02 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Speed
>
>
> I am fairly new to PHP and am right now writing my first complicated
> script. There is a lot of HTML in the page and I was
> wondering which
> method is faster. To always be inside the <?php ?> tags or
> to stop and
> start.
> Here is a quick example (not necessarily a good one)
> <?php
> $sql2 = "select ABBREV from STATES";
> $result2 = OCIParse($conn,$sql2);
> OCIExecute($result2) or die("It's not possible to query");
> ?>
> <select name=STATE >
> <?php
> while (OCIfetch($result2,1)) {
> ?>
> <option><?php echo OCIresult($result2,1)?>
> <?php } ?>
> </SELECT>
>
> OR
>
> <?php
> $sql2 = "select ABBREV from STATES";
> $result2 = OCIParse($conn,$sql2);
> OCIExecute($result2) or die("It's not possible to query");
> echo "<select name=STATE >";
> while (OCIfetch($result2,1)) {
> echo "<option>";
> echo OCIresult($result2,1)
> }
> echo "</SELECT>";
> ?>
>
> Also which is faster print or echo.
> Thanks
>
> *---------*-----------*----------*---------*---------*--------
> -*--------*
> Jerry Nelson
> Systems Analyst
> Datanamics, Inc.
> 973-C Russell Ave
> Gaithersburg, MD 20879
> TEL: 301-948-3515
>
>
> --
> PHP Windows 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]
>