Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7973319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:04:18+00:00 2026-06-04T08:04:18+00:00

I have a form which is passing a number array like (56,78,98) . I

  • 0

I have a form which is passing a number array like (56,78,98). I have stored that array in a variable called $array.

eg:

if(isset($_POST['submit']))
 {
 $checkbox_values=$_POST['checkbox_values];
$array= implode(',',$checkbox_values);
 }

$_POST['checkbox_values] is values of check boxes from a form.

I need to retrieve value of $array after the if(isset($_POST['submit'])) condition. I am using zend frame work. How can I use $array after if condition? or how can I use session or cookie in zend?

Thanks!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:04:19+00:00Added an answer on June 4, 2026 at 8:04 am

    you could assign the array directly to the session using Zend_Session_Namespace:

    //you can initialize the session namespace almost anywhere.
    $session = new Zend_Session_Namespace('form')
    if(isset($_POST['submit'])) {
        $checkbox_values=$_POST['checkbox_values'];
        //will assign values to session namespace 'form' as key 'checkbox_values' as an array
        //session namespace will also accept objects and scalar values.
        $session->checkbox_values = implode(',', $checkbox_values);
        //$array= implode(',',$checkbox_values);
     }
    

    you can use the array any way you choose. You can pass it to the view…
    $this->view->checkboxValues = $session->checkbox_values;

    or you can pass it to your favorite model, what ever you need to do you can do. the session will remain until you unset it or overwrite it.

    Good Luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bootstrap formtastic form which was passing all of my rspec tests.
I have an Ext.form.Panel that calls a PHP page by passing search parameters. The
I have a Javascript object called TweenManager which contains an array of Tween objects.
I have a form which has a collection for manager which is an autocomplete
I have a form which I wish to be be represented graphically elsewhere on
I have a form which has a ListView and buttons to add/edit/delete items from
I have a form which is dynamically generated based on user input. Initially the
I have a form which has a drop down list for countries. If the
I have a form which allows my user to edit the information as required.
I have a form which contains a checkbox field. On page load I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.