Everyone
Thank you for all the great feedback. Since my function doesnt return data it just echos it to the browser.
When I use this format it does not display correctly
echo "some text" . aFunction() . "some more text";
If I use the orginal code it displays fine. echo "Some text"; aFunction(); echo "More text";
Thanks for all the help.
-B
Philip Olson wrote:
I cant figureout the syntax please help
echo "Some text".aFunction()."some more text";
The function is not working.
Your problem is the paren's
echo "'some text' $aFunction 'some more text'";
You need double quotes for the entire string, but single quotes around the text so it knows it is text.
This is very much incorrect, not sure where to begin but please ignore this advice. A string is a string is a string is a string:
http://www.php.net/types.string
I'm 99% sure the problem is aFunction() is echoing a value as opposed to returning one, this is a common question answered here:
http://www.php.net/manual/en/faq.using.php#faq.using.wrong-order
If that doesn't answer your question then please post the code.
Regarding the subject of this thread you should consider asking smart questions by reading the following in its entirety:
http://www.catb.org/~esr/faqs/smart-questions.html
Very useful for all parties involved! :)
Regards, Philip
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php