skip to Main Content

convert heading to ul list by php

I am learning php language. I want to show the table of contents for the article. Convert the headings (h2,h3,h4,...) into a list and create links. This is my php code. $Post = ' <h2>Title 01</h2> <h3>Title 01.01</h3> <h3>Title 01.02</h3>…

VIEW QUESTION

Can't update my inventory table with array laravel

I have an array list of data I want to update to the inventory table. $data['items'] = DB::table('inventory_items')->select('inventory_items.*') ->join('sorder_parts', 'inventory_items.id', 'sorder_parts.inventory_id') ->where('sorder_parts.sorder_id', '=', $id) ->selectraw('inventory_items.quantity - sorder_parts.quantity AS new_quantity') ->get()->toArray(); foreach ($data as $product_item) { $reduce_quantity = InventoryItem::updateOrCreate(['id' => $product_item['items']['id']],…

VIEW QUESTION
Back To Top
Search