[Database store in array] Help make the order change, from the front to be the end

Discussion in 'PHP' started by basketmen, May 22, 2012.

  1. #1
    Hi guys,

    1. i have a database field stored in array, the default is like this



    2. now i want to add a value in that field, by run this link : http://www.domain.com/filename.php?cmd=addmod&modid=2 (please see the complete filename.php file content here : http://pastebin.com/BabtP21Y , the part that i think responsible for this i think about line 674-709, that i highlighted there)

    the field become like this, there is new code in the front that highlighted below





    3. the only problem, i need it to put it in the back and the position are reserved, so like this that highlighted below
    please help to make the array position stored like that, maybe by editing the php file





    GBU for that helping
     
    basketmen, May 22, 2012 IP
  2. e-abi

    e-abi Member

    Messages:
    122
    Likes Received:
    1
    Best Answers:
    3
    Trophy Points:
    38
    #2
    dump the variable contents not by serialized form, but like this:
    echo '<pre>'.htmlspecialchars(print_r($var, true)).'</pre>';
    PHP:
    This way you can inspect the contents and it is easier for your eye to understand, how the variable is stored.

    If you are unable to modify the variable to your liking, then paste the variable dumps here, because reading them in a serialized form is pain in the ass.
     
    e-abi, May 22, 2012 IP
  3. basketmen

    basketmen Well-Known Member

    Messages:
    837
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    130
    #3
    i am sorry, i dont know how to do that, can you edit the php file please http://pastebin.com/BabtP21Y , or clue which part that i need to edit in the php file

    i really apreciated it
     
    basketmen, May 22, 2012 IP
  4. e-abi

    e-abi Member

    Messages:
    122
    Likes Received:
    1
    Best Answers:
    3
    Trophy Points:
    38
    #4
    I think you need to seek someone more professional and pay for the job then.....
     
    e-abi, May 22, 2012 IP