Nevermind - found the answer. The current line number is held in the
constant __LINE__ and the current file name is held in the constant __FILE__

So I can do the following:
print "this is line " . __LINE__ . " in the file " . __FILE__;

- Jonathan

"Jonathan Hilgeman" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there any way to print the current line number? i.e.
>
> 43  print "blah";
> 44  print "this is line $LineNumber";
> 45  print "etc";
>
> and have it result in :
> blahthis is line 44etc
>
> ?
>
> - Jonathan
>
>



-- 
PHP General 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]

Reply via email to