In article <97ifmk$p85$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("elias") wrote:

>   function debuginfo($msg)
>  {
>   echo"<b>the message is $msg, at line" . __LINE__ . " </b><br>";
>  }
> 
> in my code:
>  line 1
>  line 2
>  line x: debuginfo("hello!!!");
> 
> is there is anyway to show the caller's line number? in this case 'x' ?

Pass __LINE__ to the function as one of its arguments:

 function debuginfo($msg, __LINE__)
  {
   echo"<b>the message is $msg, at line" . __LINE__ . " </b><br>";
  }

-- 
CC

-- 
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