Page 1 of 1
An echo like function
Posted: Wed Feb 09, 2005 4:59 pm
by Todd_Z
Can i make a custom function that would work without parentheses, like this =>
Posted: Wed Feb 09, 2005 5:15 pm
by John Cartwright
what?

Posted: Wed Feb 09, 2005 5:25 pm
by feyd
no.
...
Posted: Wed Feb 09, 2005 7:17 pm
by s.dot
Why would you need to?
echo "Hi, my name is $name"; would do just that... so why would you need an echo like function?
Posted: Wed Feb 09, 2005 9:38 pm
by Todd_Z
Basically I was going to make a function (show) that automatically formatted the output of the webpage so that I wouldn't have to deal with the
\n's and the \t's which go along with my obsession with perfect source. And since i like the whole echo "string"; look w/o the parentheses (idk why) i was hoping i could do that with show.
Posted: Wed Feb 09, 2005 9:42 pm
by feyd
did you look at heredoc?
Code: Select all
echo <<<STOP
blahlahblahala
$var blahlbah
tab blalahlab
STOP;
http://php.net/types.string