Linked Questions

Popular Questions

PHP remove element form array is not working properly

Asked by At

I am trying to remove Product element using unset from the array but it's not working. also, need to insert this array using MySql. How can I achieve this?

unset( $ar2['Product'] );
        print_r($ar2);

Result showing with Product

Array
(
    [0] => Array
        (
            [Product] => Resume, CV, vCard & Portfolio HTML5 Template
            [Price] => 10
            [Img] => http://localhost/envy-theme-new/wp-content/uploads/2019/01/cv.jpg
        )

    [1] => Array
        (
            [Product] => Runhill – Multipurpose Construction WP Theme
            [Price] => 39
        )
)

Related Questions