Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

PHP code modification

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

PHP code modification

Unread post by Janusz »

Hi,
I wanted to try to do some adaptation of one function but now I have one blocking point.
When I am checking with nuDebug the current array value - I have data as in the first box. So I wrote some code (in the second box) which is suppoused to generate results exactly as in the first box.
but can not get the same result despite many trials (the main problem is stdClass Object) - one of the results as example is in the last box.
And the question how to modify my code (from second box) that it will generate result exactly as visible in the first box?

Code: Select all

[0] : Array
(
    [0] => stdClass Object
        (
            [title] => Hotele - Miejsce
            [display] => hot_miejsce
            [align] => l
            [width] => 450
            [order] => 10
            [format] => 
        )

    [1] => stdClass Object
        (
            [title] => Aktualizacja
            [display] => hot_updated
            [align] => c
            [width] => 200
            [order] => 20
            [format] => 
        )

)
and I want to modify sligtly that data - but first I want to have the the code which will generate exacly result as above:
so for example with following code:

Code: Select all

$testarray = array(
'stdClass Object'=>
      array('title' => 'Hotele - Miejsce',
            'display' => 'hot_miejsce',
            'align' => 'l',
            'width' => 450,
            'order' => 10,
            'format' =>'' ,),

      array('title' => 'Aktualizacja',
            'display' => 'hot_updated',
            'align' => 'c',
            'width' => 200,
            'order' => 20,
            'format' =>'' ,),
);
I have following result:

Code: Select all

[0] : Array
(
    [stdClass Object] => Array
        (
            [title] => Hotele - Miejsce
            [display] => hot_miejsce
            [align] => l
            [width] => 450
            [order] => 10
            [format] => 
        )

    [0] => Array
        (
            [title] => Aktualizacja
            [display] => hot_updated
            [align] => c
            [width] => 200
            [order] => 20
            [format] => 
        )
)
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: PHP code modification

Unread post by kev1n »

This is not a nuBuilder-specific question, maybe you could ask at stackoverflow. Normally you get answers there very quickly.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: PHP code modification

Unread post by Janusz »

Yes - you are right - the answer from stack overflow was immidiate.
I will remove soon this post not to spam this forum.
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: PHP code modification

Unread post by kev1n »

Janusz wrote:Yes - you are right - the answer from stack overflow was immidiate.
:D :D
Post Reply