Re: Number of the line ?
| From: | In�rcia Sensorial | Date: | Fri, 06 Jul 2001 17:54:21 +0000 |
| Subject: | Re: Number of the line ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56534@lists.php.net to get a copy of this message | ||
Doesn't work if you put ++ after the variable?
> 1 <?php
> 2 echo "i'm on line $NUMBER_LINE++\n";
> 3 echo "i'm on line $NUMBER_LINE++\n";
> 4 ?>
Or maybe:
echo "i'm on line "
.$NUMBER_LINE++
."\n";
--
Julio Nobrega.
A hora está chegando:
http://sourceforge.net/projects/toca
"Emmanuel FAIVRE" <manu@manucorp.com> wrote in message
news:php.general-56461@news.php.net...
> Hi All,
>
> i'm currently writing a debugging lib in PHP and i would like to find
> the number of the line in my script
>
> when i made an
>
> myfile.php
>
> 1 <?php
> 2 echo "i'm on line $NUMBER_LINE\n";
> 3 echo "i'm on line $NUMBER_LINE\n";
> 4 ?>
>
> would give :
>
> i'm on line 2
> i'm on line 3
>
> it perhaps exists because when we have warning we see the line number
>
> Thanks
>
>
> Manu
>