summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/debugs.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/debugs.lua b/lib/debugs.lua
index 9ff9e9d..32eec7c 100644
--- a/lib/debugs.lua
+++ b/lib/debugs.lua
@@ -37,3 +37,15 @@ function variables ( view )
io.write( "<BR><BR>------------ END DEBUG INFORMATION ------------</span>")
return
end
+
+
+-- from http://lua-users.org/wiki/MakingLuaLikePhp
+function print_r (t, indent) -- alt version, abuse to http://richard.warburton.it
+ local indent=indent or ''
+ for key,value in pairs(t) do
+ io.write(indent,'[',tostring(key),']')
+ if type(value)=="table" then io.write(':\n') print_r(value,indent..'\t')
+ else io.write(' = ',tostring(value),'\n') end
+ end
+end
+