Get in touch:
01524 851 877
07718 896 553

Christians Alive Website Live

Posted on Jan 17 2012

The new website for Christians Alive in Lancaster has been set live. It has been fully developed by Evolution Systems and brings together news and events for the Church. The website is up and running at

Nice PHP print_r Formatted Table Function

Posted on Jan 16 2012

Whilst looking through I stumbled across the following function that will print out an array in a nicely formatted table. When dealing with lots of nested array something like this makes it much easier to see all of the data contained within an array.

 function print_nice($elem,$max_level=10,$print_nice_stack=array()){
 if(is_array($elem) || is_object($elem)){
 echo "<font color=red>RECURSION</font>";
 echo "<font color=red>nivel maximo alcanzado</font>";
 echo "<table border=1 cellspacing=0 cellpadding=3 width=100%>";
 echo '<tr><td colspan=2  style="background-color:#333333;"><strong><font  color=white>ARRAY</font></strong></td></tr>';
 echo '<tr><td colspan=2 style="background-color:#333333;"><strong>';
 echo '<font color=white>OBJECT Type: '.get_class($elem).'</font></strong></td></tr>';
 foreach($elem as $k => $v){
 echo '<tr><td valign="top" style="width:40px;background-color:'.$rgb.';">';
 echo '<strong>'.$k."</strong></td><td>";
 echo "</td></tr>";
 echo "</table>";
 if($elem === null){
 echo "<font color=green>NULL</font>";
 }elseif($elem === 0){
 echo "0";
 }elseif($elem === true){
 echo "<font color=green>TRUE</font>";
 }elseif($elem === false){
 echo "<font color=green>FALSE</font>";
 }elseif($elem === ""){
 echo "<font color=green>EMPTY STRING</font>";
 echo str_replace("\n","<strong><font color=red>*</font></strong><br>\n",$elem);