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 3806106
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:46:59+00:00 2026-05-19T14:46:59+00:00

I know that, If I put this on a link , and I hit

  • 0

I know that, If I put this on a link, and I hit that link:

array('controller'=>'challenge','action'=>'evaluateChallenge','codTeam'=>$d["cod_challenge_team"]);

And if, on the controller I do:

$values = $this->_request->getParams();
 $teamVo->setCodTeam($values['codTeam']);

that I will get the desired value.

I want to do the same, BUT, without the user to interact.
I intend to pass a value to evaluateChallenge, each time I loop trough values on the view side.

This is one of the most silly questions, but it sure translates the loss here.

Can I have your help?

Or at least tell me what I’m saying wrong. 🙂

::::::::::::::::::::::::::::::::::UPDATE::::::::::::::::::::::::::::::::::::::

I want to display a list of database records elements, related to a given team.
So that I can have:

TEAM A
– cod_team
– Challenge A
– Participants ABC
– Points XXX

TEAM B
– cod_team
– Challenge A
– Participants ABC
– Points XXX

And so on…

The code translation to this on my view is something like this:

foreach ($challenge as $d) { 
echo $d['challengeName'];
echo $d['participants'];
echo $d['points'];
}

All nice and clear.

Now, I need to add another information to this list so that I can have something like:

TEAM A
– cod_team
– Challenge A
– Participants ABC
– Points XXX
– FILESATTACHED_NEW_INFORMATION

TEAM B
– cod_team
– Challenge A
– Participants ABC
– Points XXX
– FILESATTACHED_NEW_INFORMATION

and so on…

This new information should be worked out on a view helper. Ok.
I will figure it out about how to do that.

Then, however, I need to call that helper on the view – correct? On that same view where the foreach is. However, I will need the FilesAttached to be associated with the foreach ($challenge as $d) somehow right? – Or is there other way around?

If there isn’t another way around:
How can we relate the data coming from the helper, with the data already existent on the view via the foreach?

Thanks a lot again,
MEM

  • 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-19T14:46:59+00:00Added an answer on May 19, 2026 at 2:46 pm

    I want to do the same, BUT, without the user to interact. I intend to pass a value to evaluateChallenge, each time I loop trough values on the view side.

    You could do that with the Action ViewHelper, but that would create a new dispatch loop for each call to it. This will severly slow down your application, which is why you should avoid it. The helper might also be removed in ZF2.

    A better approach would be to use a ViewHelper that you can pass in the required arguments. That view helper will then query the appropiate model with the passed arguments and return the values you want. As long as this does not change the Model state, it is okay to fetch data from the View directly.

    RE Update

    There is no magic about it:

    foreach ($challenge as $d) { 
        echo $d['challengeName'],
             $d['participants'],
             $d['points'];
    
        $results = $this->evaluateChallenge($d['cod_challenge_team']);
        // now do something with the results
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that if you put a link in a textview it will work
I know that I should put all the html elements in body tag, but
I know that GUI code in Java Swing must be put inside SwingUtilities.invokeAndWait or
I dont't know how to put that, but I need y coordinates of the
Does someone know of a Sqlite manager that I can put on my site,
I know that this sort of question has been asked here before, but still
I know that this line of code will make the cell text-wrap: $objPHPExcel->getActiveSheet()->getStyle('D1')->getAlignment()->setWrapText(true); 'D1'
I know that somewhere in the history of the internet this must have been
I have this a and I don't know that I need to insert into
So far, I know that in Rails I can simulate a PUT request using

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.