What is the space character for the browser?
- by Hiro Protagonist
echo "\n\s\s\s\s\s\s" . "<div id='data-load' data-load='" . $load . "'></div>";
\n works for adding a return in...I tried \s logically for space but this does not work.
Keep mind, I don't want this rendered in the browser view...but in the source view ( when you click view-source )...I'm trying to put my html in to a readable form.
echo "      \n" . "<div id='data-path' data-path='" . $path . "'></div>";
This does not work either. I am composing HTML from PHP...
echo " \n" . "<div id='data-load' data-load='" . $load . "'></div>";
This does not work either.
Actual Code:
public static function setUniversals()
{
$shared_object = new Shared();
if ( $shared_object->getLoadOn() == 1 )
{
$load = 'server';
}
else
{
$load = 'client';
}
if( getcwd() === '/home/foo/public_html/develop' )
{
$path = 'development';
}
else
{
$path = 'production';
}
$shared_object = new Shared();
echo "\n";
echo "\n " . "<div id='data-path' data-path='" . $path . "'></div>";
echo "\n " . "<div id='data-load' data-load='" . $load . "'></div>";
}