Jump to content


Photo

Printing $_session values in one go?


  • Please log in to reply
3 replies to this topic

#1 bilis_money

bilis_money
  • Members
  • PipPipPip
  • Advanced Member
  • 621 posts

Posted 13 July 2006 - 01:03 PM

hi, i'm tired of typing them again and again in piece by piece.
so i would like to hear your tricks on how would you go about to print this in one go?

I've assigned all the $_session like these below,
$_SESSION['s_id'] = $row[id];
$_SESSION['s_photo_filename'] = $row[photo_filename];
$_SESSION['s_tmp_name'] = $row[tmp_name];
$_SESSION['s_type'] = $row[type];
$_SESSION['s_size'] = $row[size];
$_SESSION['s_path'] = $row[path];
$_SESSION['s_date'] = $row[date];
$_SESSION['s_comments'] = $row[comments];
$_SESSION['s_photo_category'] = $row[photo_category];

now how would i print them on one go? a very short codes trick is much better.

Thank you very much in advance.


-ok, i'll try to experiment mine while waiting your trick for this.


#2 hvle

hvle
  • Members
  • PipPipPip
  • Advanced Member
  • 667 posts
  • Locationmelbourne, Australia

Posted 13 July 2006 - 01:17 PM

print_r($_SESSION);

hehe
Life's too short for arguing.

#3 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 13 July 2006 - 01:20 PM

Use
<?php echo '<pre>' . print_r($_SESSION,true) . '</pre>'; ?>
and the dump will be formatted in a much more readable way.

Ken

#4 bilis_money

bilis_money
  • Members
  • PipPipPip
  • Advanced Member
  • 621 posts

Posted 13 July 2006 - 01:32 PM

yeah that's what in my mind too, but i'm having slow turtle walk in my
bandwidth right now.

i guess i can try it later.

But thanks anyway.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users