# What line am I? PHP

**URL:** <https://forum.kirupa.com/t/what-line-am-i-php/151471>\
**Category:** programming\
**Created:** [June 15, 2005, 6:24pm UTC](https://forum.kirupa.com/t/what-line-am-i-php/151471 "2005-06-15T18:24:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imagined](https://avatars.discourse-cdn.com/v4/letter/i/a87d85/32.png) [@imagined](https://forum.kirupa.com/u/imagined)\
**Post date:** [June 15, 2005, 6:24pm UTC](https://forum.kirupa.com/t/what-line-am-i-php/151471/1 "2005-06-15T18:24:00Z")

</div>

I’m using Dreamweaver to code. On the code, if something goes wrong, I echo an error message. Like:

if(something goes wrong)  
exit(“Please go back and try again.”);

I would like to also echo the line number on the error message, so it will be easier to find what failed while debugging.

Is there a way to do something like…

if(something goes wrong)  
exit("Please go back and try again. " . printline);

Thanks in advance,

Leo
