Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
overriding value and creating extra value while using foreach loop

accepting serialized data array from javaScript, and i want to work with each array value of serialized data. but when data is updated its overriding name field and creating extra array with only name field.

['checked_dns=0&name=localhost.vias.jfkl.&domain=via…12520&type=A&record=*.*.*.*&ttl_sel=14400', 'checked_dns=2&name=ns1.vias.jfkl.&domain=vias.jfkl…12369&type=A&record=*.*.*.*ttl_sel=14400', 'checked_dns=3&name=ns2.vias.jfkl.&domain=vias.jfkl…15000&type=A&record=*.*.*.*&ttl_sel=14400']

This Serialized array i am receiving.

$data_arr = $_POST['arr'];
    foreach($data_arr as $value){
        $single_arr = [];
        $single_arr = explode("&",$value);
        foreach($single_arr as $val){
            $single = explode("=",$val);
            $final_arr[$single[0]] = $single[1];

            
            // // Just Check
            $name = $final_arr['name'];
            $point = $final_arr['edit_record'];
            $ttl = $final_arr['ttl_sel'];
            $type = $final_arr['type'];
            $address = $final_arr['record'];
                            
            // Checking done now edit record        
            $check = $softpanel->fun_for_update_record($point, $name, $ttl, $type, $address);

        }
        
    }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!