Get $superCage->post-> Name !!!! Get $superCage->post-> Name !!!!
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Get $superCage->post-> Name !!!!

Started by FredNexus, May 12, 2016, 02:55:55 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

FredNexus

Hello,

I need to assign to a var a post value but I do not know it's name !  :-\

$my_var = $superCage->post->getEscaped('I do not know the name');  :o

I would like to know if it's possible to detect the name of the $superCage->post ??

Thanks

Nexus 8)

ron4mac

Temporarily insert this in your code:

echo'<xmp>';var_dump($superCage->post);echo'</xmp>';

It will display what values there are.

FredNexus

Thanks  ;D

I know this solution to debug.

I looking for a production solution.

It's to not have to write 500 $superCage->post->keyExist to check what value's name is send to.  ;D

Thanks


ron4mac

Use:

$superCage->post->_source

To get an array of name/values.

FredNexus

Thanks  ;D

I didn't know '_source'

Thanks !