Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
return session variables from a function
Old 05-02-2008, 12:32 PM return session variables from a function
Average Talker

Posts: 27
Trades: 0
hi,

i have written a function that reads all the images in a given directory, and then would like to store each image name in a session variable as an array that is then returned outside the function, so that elsewhere the session variable can later be called upon again for use.

i have had no problems with the script reading the images in the directory and storing them in a session variable, however i am having problems in returning the session variable and as an array back to outside the function so it can be used elsewhere.

Any ideas anyone?

Thanks
gavrd1 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-02-2008, 09:27 PM Re: return session variables from a function
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
$_SESSION is a superglobal -- you don't need to return it from the array.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 05-05-2008, 05:13 AM Re: return session variables from a function
Average Talker

Posts: 27
Trades: 0
problem solved, many thanks!
gavrd1 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to return session variables from a function
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13025 seconds with 12 queries