Saving variabes and the echoing them.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

You are treating the value returned from unserialize() as an array, correct?
rpgfan
Forum Newbie
Posts: 11
Joined: Wed Feb 07, 2007 5:37 pm

Post by rpgfan »

Nevermind! I have it!
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Well, serialize() takes mixed variables, so you should expect unserialize to return mixed variables. Thus, it's not a simple string. If you just want to look at it, don't echo, use print_r().

EDIT: Congrats.
rpgfan
Forum Newbie
Posts: 11
Joined: Wed Feb 07, 2007 5:37 pm

Post by rpgfan »

Thanks for all of your guy's help. And whats the difference print_r() and echo()?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

echo() and print() are similar, except that print() and echo() are a language constructs. print_r() and var_dump() are along the same lines of similarity, but both are functions.
rpgfan
Forum Newbie
Posts: 11
Joined: Wed Feb 07, 2007 5:37 pm

Post by rpgfan »

oooohhhhhhkkkkaaaayyyyy...................
Post Reply