PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 27, 2022

[FIXED] Get multidimensional post array via Yii getPost function

 January 27, 2022     frameworks, post, yii     No comments   

Issue

If i have a $_POST array as follows:

$_POST['request']['type']['user'] = 'abc';

How would I access this same variable using the Yii::app()->request->getPost() functionality built into Yii 1.x


Solution

Sussed it..

Yii::app()->request->getPost('request');
echo $request['type']['user'];


Answered By - Zabs
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing