Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 26th, 2011, 11:45 AM
Authorized User
Join Date: Jun 2005
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts
Default trying to session register a dynamically created array

I am using dynamically created array names in a script by naming them in a loop with the following syntax ${"month_totals_array_$pc"} What this is doing is starting off with each of these array names being "month_totals_array_" and then adding an extension ($pc) to each of them based on values from another array of product classes that I have at the start of the loop. That part works fine for me and everything is good until I try to session_register each of the dynamically created arrays. I have tried syntax like session_register(${"month_totals_array_$pc"}) and session_register('${"month_totals_array_$pc"}') and even though an error is not brought it appears that the arrays are not added to the session, because I can't retrieve them using $_SESSON['${"month_totals_array_$pc"}']. I just need to know how to session_register a dynamically named array like those I mentioned above. I have been looking for information about this for days now and there isn't much out on the web. Thanks.
Cullan crothers

Similar Threads
Thread Thread Starter Forum Replies Last Post
php5=> diff b/w session start() and session register() sandeepgreaternoida BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 1 May 8th, 2009 03:06 PM
Please help me about dynamically created controls vingo_mail ASP.NET 2.0 Basics 1 March 24th, 2008 12:54 PM
Dynamically created code Puck312 Pro VB 6 3 September 7th, 2005 01:21 PM
Dynamically created controls katsarosj ASP.NET 1.0 and 1.1 Basics 4 February 4th, 2004 09:13 PM
How to register a .wsc component dynamically? yornway Classic ASP Components 0 July 15th, 2003 04:06 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.