I got:
function notification($text, $info = FALSE, $title = FALSE) {
global $layout_name;
return '<div class="SmallBox"><div class="MessageContainer"><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="'.($info ? "Valid" : "Error").'Message"><div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/'.(!$info ? 'attentionsign.gif' : 'valid.png').');" /></div><b>'.(!$title ? (!$info ? 'Wystąpiły następujące błędy:' : 'Sukces!') : $title).'</b><br/>'.$text.'</div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div></div></div>';
}
I wonder if there is a way, to print it out without using echo notification('text...', FALSE/TRUE, 'some title');
Just only notification('text...', FALSE/TRUE, 'some title'); (without echo) ?
If so, how can it be done?
you can use this function instead :
but its still echoing the results, there is no way to avoid using the function
echo.PASSING BY REF
the function would look something like the function below, but you should change it around to meet your own needs :
Now if you use this function and pass your
$contentvariable, it will change the $content outside the function. note that passing by reference is done in php by adding a&before the variable$VAR.