Thread: method madness
View Single Post
Old 05-20-2008, 04:29 PM   #8 (permalink)
Evulness
The Contributor
 
Evulness's Avatar
 
Join Date: Apr 2008
Location: Tampa, FL
Posts: 65
Thanks: 6
Evulness is on a distinguished road
Default

sorry guys i've been down with a migraine for the last few days...
i switched it to print_r in my method, and its working, so far.... though heres something odd i found...

the result of a var_dump, on $result breaks the item selected into an array, making $result[1-9] = a letter of that item. aka pulling the username, breaks ths result down, if i print($result) it prints "Evulness" but if i print($result[1]); it returns E, 2 returns v, 3 returns u, etc...
if i print $result;, i get the full username....
odd... about how it breaks the username down into an array like that...

when i var_dump $result, it gives me
Quote:
string(7) "Evulness"
i was curious why it said 7, not knowing it counts the letters in the result. which is how i found it breaks each letter into its own entry in the array... var_dump ($result[3]); returns string (3) "l".

it looks like its working how i wanted, with it printing the result like that....
see i thought print would work, but print for some odd reason wasn't returning anything, it was in an array, and print($result) was returning result[0], which is empty... but print_r ($result), and print_r($result[0-7]) returned the username, and each letter as it was called...

Messing around like that just gave me a good idea for a feature for the cms.

thanks for pointing out print_r..... and i never thought of using var_dump.... i have a query output for debugging my mysql, but maybe i should put the var_dump and print_r into it too.
__________________
"Knowledge is power. Abuse it."~Evulness
My portfolio: www.evularts.com
Send a message via AIM to Evulness
Evulness is offline  
Reply With Quote