Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Macro in PHP ?
- Pjotr Wedersteers
August 3, 2004, 4:46 pm
rate this thread
I am curious if there is a solution for the following in PHP4:
I often echo something to my browser during tests. I often forget to add a
<BR> to the end of the echo command.
Is it possible to use something like a mcro in C++ to have a command I can
use like echo but which automatically adds the <br> ?
Or is there a command that does that for me ?
Alternatively I could write a function of course, but then brackets come in
to play as well.
Re: Macro in PHP ?
Thanks. But this is as "cumbersome" as writing a simple function echobr ();
I decided to try the following -a constant- for a while. Maybe someone likes
it or has better ideas.
echo "Mystring or whatever".br;
Another advantage is I can easily change all breaks to newlines and vice
versa when I am working in my PHP ide, which doesn't display breaks
- » Help needed - URL parameters do not update variables
- — Previous thread in » PHP Scripting Forum