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

  • Home
  • SEARCH
  • 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 1049519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:37:45+00:00 2026-05-16T16:37:45+00:00

iam using the Zend framework and assign the array from the controller to view.

  • 0

iam using the Zend framework and assign the array from the controller to
view. The array is coming from execution of stored procedure result

$results = callProcedure('testprocedure', $in)//$in is an array of input values 
$view->results =$results['record'];

In The $results['record'] array iam having two values such as 'NO' and 'name' and i
want to assign this values also the view.However this values will be available in the $results['record']; array.
But in the view i need have the values separately i dont repeat them in the loop .
if i dont do for each iam not getting the values

How do i assign these values from the controller

$view->no=???
$view->NAME=???

How do i access $results['record'] array in the view

$this->results['NO']//  it is saying undefined index 'NO'
$this->results['NAME']// it is saying undefined index 'NAME'    
  • 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-05-16T16:37:46+00:00Added an answer on May 16, 2026 at 4:37 pm

    To access the vies from the controller you must use $this->view->. Then from the view its $this-> because when in the view $this is the view object itself.

    so try:

    $results = callProcedure('testprocedure', $in)//$in is an array of input values 
    $this->view->results = $results['record'];
    

    From the controller it looks like this echoing them:

    echo 'no: ' .$this->view->results['no']. '<BR />';
    echo 'name: ' .$this->view->results['name'];
    

    So do to it from the view just:

    <?php
        echo 'no: ' . $this->results['no'] . '<BR />';
        echo 'name: ' . $this->results['name'];
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Zend Framework. My task is to send JSON data from controller
I am using the Zend Framework helper for JSON. I am returning an array
Avoiding Fat Controller So I'm using Zend Framework and I have a question involving
i am developing a Rest Controller using Zend Framework and i have to use
I am using Zend Framework. Want to make a portlet kind of view, which
I am using Zend Framework with PHPTAL templates for view sites. Problem is that
I am using Zend Framework. I want to fetch record from database without considering
I am using zend framework to grab user's email inbox. I got token from
Iam trying to generate the menu and For that iam using navigation.xml (Zend Framework)
Iam rendering a menu (using Zend framework) (zend_navigation) what iam doing is getting the

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.