Friday, November 19, 2021

[New post] How to prevent the Undefined index in PHP?

Subash Chandran posted: "// Your array index has no value or is not referencing anything, // The easiest way to overcome this is to simply check whether // it has been defined if (isset($arr[$i])) { // Do something }"

[New post] PHP code snippet – How to create route in laravel?

Subash Chandran posted: "use App\Http\Controllers\PagesController; // Create route for About Page Route::get('about-us', [PagesController::class, 'aboutPage'])->name('pages.about');"

[New post] PHP code snippet – How to create resource in laravel?

Subash Chandran posted: "php artisan make:controller PhotoController --resource --model=Photo Route::resource('photos', PhotoController::class);"

[New post] Heat set adaptor for drill press

asteriondaedalus posted: " Figure 1 Multiple ideas for DIY heat set presses. As I have a drill press from Jaycar, thanks to an XMAS gift card, I only need make an adaptor for that to hold one of my soldering irons. So Figure 1 is a cube, with chamfers, polar rotated, and t"

[New post] PHP code snippet – How do i use read excel file?

Subash Chandran posted: "// Include PHPExcel_IOFactory include 'PHPExcel/IOFactory.php'; $inputFileName = './sampleData/example1.xls'; // Read your Excel workbook try { $inputFileType = PHPExcel_IOFactory::identify($inputFileName); $objReader = PHPExcel_IOFactory::cre"

[New post] How to loop with while in PHP for array associative?

Subash Chandran posted: "$assocarray = array('a' => 1, 'b' => 2, 'c' => 3); $keys = array_keys($assocarray); rsort($keys); while (!empty($keys)) { $key = array_pop($keys); echo $key . ' = ' . $assocarray[$key] . '<br />'; }; "

Generate a catchy title for a collection of newfangled music by making it your own

Write a newfangled code fragment at an earlier stage to use it. Then call another method and make sure their input is the correct one. The s...