Jump to content

[SOLVED] echo output, not what I expected...


tefuzz

Recommended Posts

still learning  ;)

 

i have functions that populate drop down lists for my form, i just want non breaking spaces between them...so i used this line

echo (getMonths("month") . "  " . getDays("day") . "  " . getYears("year", "1900", "2009") . "\n</td>\n</tr>");

 

but it does not echo the spaces, they don't even come up in the page source...actually...4 spaces come up after all the code tat gets created from the function, but nowhere else...the lists show, and the </td> and </tr> are in the page source, but not the spaces...am I thinking too hard for this  :D

Link to comment
https://forums.phpfreaks.com/topic/153587-solved-echo-output-not-what-i-expected/
Share on other sites

Not sure if this would make much a different, but try passing them as parameters to echo:

echo getMonths("month"),"  ",getDays("day"),"  ",getYears("year", "1900", "2009"),"\n</td>\n</tr>";

 

If not, make sure error_reporting(E_ALL); is a the top of your script.

Not sure if this would make much a different, but try passing them as parameters to echo:

echo getMonths("month"),"  ",getDays("day"),"  ",getYears("year", "1900", "2009"),"\n</td>\n</tr>";

 

If not, make sure error_reporting(E_ALL); is a the top of your script.

 

worked like a charm...thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.